summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Thiel <byronimo@gmail.com>2009-11-03 15:20:28 +0100
committerSebastian Thiel <byronimo@gmail.com>2009-11-03 15:20:28 +0100
commit6bca9899b5edeed7f964e3124e382c3573183c68 (patch)
tree1a369ed2c5db1254bc5ef3aa0b13890aaa9ee443
parent615fc1984b0cc09c8eeab51a1d1c4e05b583b4a7 (diff)
downloadgitpython-6bca9899b5edeed7f964e3124e382c3573183c68.tar.gz
repo.is_dirty: is a method now - the property based interface didn't allow all parameters to be used. The test would not test everything either, and I would consider this a bug that slipped through
-rw-r--r--lib/git/repo.py1
-rw-r--r--test/git/test_repo.py6
2 files changed, 3 insertions, 4 deletions
diff --git a/lib/git/repo.py b/lib/git/repo.py
index d81106c0..52469e04 100644
--- a/lib/git/repo.py
+++ b/lib/git/repo.py
@@ -432,7 +432,6 @@ class Repo(object):
alternates = property(_get_alternates, _set_alternates, doc="Retrieve a list of alternates paths or set a list paths to be used as alternates")
- @property
def is_dirty(self, index=True, working_tree=True, untracked_files=False):
"""
Returns
diff --git a/test/git/test_repo.py b/test/git/test_repo.py
index 4995d901..464cb43f 100644
--- a/test/git/test_repo.py
+++ b/test/git/test_repo.py
@@ -154,19 +154,19 @@ class TestRepo(TestBase):
def test_is_dirty_with_bare_repository(self):
self.rorepo._bare = True
- assert_false(self.rorepo.is_dirty)
+ assert_false(self.rorepo.is_dirty())
def test_is_dirty(self):
self.rorepo._bare = False
for index in (0,1):
for working_tree in (0,1):
for untracked_files in (0,1):
- assert self.rorepo.is_dirty in (True, False)
+ assert self.rorepo.is_dirty(index, working_tree, untracked_files) in (True, False)
# END untracked files
# END working tree
# END index
self.rorepo._bare = True
- assert self.rorepo.is_dirty == False
+ assert self.rorepo.is_dirty() == False
def test_head(self):
assert self.rorepo.head.reference.object == self.rorepo.active_branch.object