summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--TODO7
-rw-r--r--lib/git/repo.py4
2 files changed, 10 insertions, 1 deletions
diff --git a/TODO b/TODO
index 0915806d..75a0fb09 100644
--- a/TODO
+++ b/TODO
@@ -59,5 +59,12 @@ Tree
testing whether it raises on invalid input ? ). See 6dc7799d44e1e5b9b77fd19b47309df69ec01a99
* Derive from Iterable, simple pipe it through to Commit objects and iterate using
commit.tree.
+
+Testing
+-------
+* Create a test-repository that can be written to and changed in addition to the normal
+ read-only testing scheme that operates on the own repository. Doing this could be a simple
+ as forking a shared repo in a tmp directory. In that moment, we probably want to
+ facility committing and checkouts as well.
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: