diff options
author | Sebastian Thiel <byronimo@gmail.com> | 2009-10-21 17:00:40 +0200 |
---|---|---|
committer | Sebastian Thiel <byronimo@gmail.com> | 2009-10-21 17:00:40 +0200 |
commit | 5e52a00c81d032b47f1bc352369be3ff8eb87b27 (patch) | |
tree | fd0d54729e7416d2ddf21da4bfdc0333a7d0daae /lib/git/repo.py | |
parent | 6fcbda4e363262a339d1cacbf7d2945ec3bd83f0 (diff) | |
download | gitpython-5e52a00c81d032b47f1bc352369be3ff8eb87b27.tar.gz |
repo.is_dirty: fixed incorrect check of a dirty working tree, previously it would compare HEAD against the working tree, not the index which was intended
Diffstat (limited to 'lib/git/repo.py')
-rw-r--r-- | lib/git/repo.py | 4 |
1 files changed, 3 insertions, 1 deletions
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: |