summaryrefslogtreecommitdiff
path: root/lib/git/repo.py
diff options
context:
space:
mode:
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: