summaryrefslogtreecommitdiff
path: root/git/repo/base.py
diff options
context:
space:
mode:
Diffstat (limited to 'git/repo/base.py')
-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 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: