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.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/git/repo.py b/lib/git/repo.py
index 4ab656c4..396dd129 100644
--- a/lib/git/repo.py
+++ b/lib/git/repo.py
@@ -526,7 +526,7 @@ class Repo(object):
default_args = ('--abbrev=40', '--full-index', '--raw')
if index:
# diff index against HEAD
- if os.path.isfile(self.index.path) and \
+ if os.path.isfile(self.index.path) and self.head.is_valid() and \
len(self.git.diff('HEAD', '--cached', *default_args)):
return True
# END index handling