diff options
author | Sebastian Thiel <byronimo@gmail.com> | 2014-11-14 15:18:48 +0100 |
---|---|---|
committer | Sebastian Thiel <byronimo@gmail.com> | 2014-11-14 15:18:48 +0100 |
commit | 9044abce7e7b3d8164fe7b83e5a21f676471b796 (patch) | |
tree | d0b23acb5d87f3b40d81fc3f550a5c7ae9651353 /git | |
parent | 8f3989f27e91119bb29cc1ed93751c3148762695 (diff) | |
parent | 6c9fcd7745d2f0c933b46a694f77f85056133ca5 (diff) | |
download | gitpython-9044abce7e7b3d8164fe7b83e5a21f676471b796.tar.gz |
Merge pull request #194 from maxyz/fix-issue-41_0.3
Fix issue #41: repo.is_dirty() on empty repository with stashed files
Diffstat (limited to 'git')
-rw-r--r-- | git/repo/base.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/git/repo/base.py b/git/repo/base.py index b9335aba..933c8c82 100644 --- a/git/repo/base.py +++ b/git/repo/base.py @@ -499,8 +499,8 @@ class Repo(object): default_args = ('--abbrev=40', '--full-index', '--raw') if index: # diff index against HEAD - if isfile(self.index.path) and self.head.is_valid() and \ - len(self.git.diff('HEAD', '--cached', *default_args)): + if isfile(self.index.path) and \ + len(self.git.diff('--cached', *default_args)): return True # END index handling if working_tree: |