summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--git/db/cmd/base.py4
-rw-r--r--git/test/db/cmd/test_base.py2
2 files changed, 3 insertions, 3 deletions
diff --git a/git/db/cmd/base.py b/git/db/cmd/base.py
index b940fd03..dd9aa800 100644
--- a/git/db/cmd/base.py
+++ b/git/db/cmd/base.py
@@ -662,8 +662,8 @@ class CmdHighLevelRepository(HighLevelRepository):
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:
diff --git a/git/test/db/cmd/test_base.py b/git/test/db/cmd/test_base.py
index 9eee7223..2b9d9f69 100644
--- a/git/test/db/cmd/test_base.py
+++ b/git/test/db/cmd/test_base.py
@@ -37,7 +37,7 @@ class TestBase(RepoBase):
def test_fetch_info(self):
# assure we can handle remote-tracking branches
- fetch_info_line_fmt = "c437ee5deb8d00cf02f03720693e4c802e99f390 not-for-merge %s '0.3' of git://github.com/gitpython-developers/GitPython"
+ fetch_info_line_fmt = "c437ee5deb8d00cf02f03720693e4c802e99f390\tnot-for-merge\t%s '0.3' of git://github.com/gitpython-developers/GitPython"
remote_info_line_fmt = "* [new branch] nomatter -> %s"
fi = CmdFetchInfo._from_line(self.rorepo,
remote_info_line_fmt % "local/master",