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