summaryrefslogtreecommitdiff
path: root/lib/git/repo.py
diff options
context:
space:
mode:
authorSebastian Thiel <byronimo@gmail.com>2009-10-21 17:00:40 +0200
committerSebastian Thiel <byronimo@gmail.com>2009-10-21 17:00:40 +0200
commit5e52a00c81d032b47f1bc352369be3ff8eb87b27 (patch)
treefd0d54729e7416d2ddf21da4bfdc0333a7d0daae /lib/git/repo.py
parent6fcbda4e363262a339d1cacbf7d2945ec3bd83f0 (diff)
downloadgitpython-5e52a00c81d032b47f1bc352369be3ff8eb87b27.tar.gz
repo.is_dirty: fixed incorrect check of a dirty working tree, previously it would compare HEAD against the working tree, not the index which was intended
Diffstat (limited to 'lib/git/repo.py')
-rw-r--r--lib/git/repo.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/git/repo.py b/lib/git/repo.py
index 47b99ea4..956a3341 100644
--- a/lib/git/repo.py
+++ b/lib/git/repo.py
@@ -432,11 +432,13 @@ class Repo(object):
# start from the one which is fastest to evaluate
default_args = ('--abbrev=40', '--full-index', '--raw')
if index:
+ # diff index against HEAD
if len(self.git.diff('HEAD', '--cached', *default_args)):
return True
# END index handling
if working_tree:
- if len(self.git.diff('HEAD', *default_args)):
+ # diff index against working tree
+ if len(self.git.diff(*default_args)):
return True
# END working tree handling
if untracked_files: