summaryrefslogtreecommitdiff
path: root/git
diff options
context:
space:
mode:
authorJan Vcelak <jvcelak@redhat.com>2012-03-21 17:45:04 +0100
committerMaximiliano Curia <maxy@gnuservers.com.ar>2014-09-29 20:15:14 +0200
commit6c9fcd7745d2f0c933b46a694f77f85056133ca5 (patch)
treeea6e44db32c334c65663eaf885faa02200a2bbff /git
parent27c577dfd5c7f0fc75cd10ed6606674b56b405bd (diff)
downloadgitpython-6c9fcd7745d2f0c933b46a694f77f85056133ca5.tar.gz
Fix issue #41: repo.is_dirty() on empty repository with stashed files
Diffstat (limited to 'git')
-rw-r--r--git/repo/base.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/git/repo/base.py b/git/repo/base.py
index 71492fe8..2296cf29 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: