diff options
author | Sebastian Thiel <byronimo@gmail.com> | 2011-02-23 00:06:38 +0100 |
---|---|---|
committer | Sebastian Thiel <byronimo@gmail.com> | 2011-02-23 00:06:38 +0100 |
commit | 96c7ac239a2c9e303233e58daee02101cc4ebf3d (patch) | |
tree | 3ddff6e1f87311fb4846d5fa37b06d9d3d780048 /git/test/test_repo.py | |
parent | 5eb7fd3f0dd99dc6c49da6fd7e78a392c4ef1b33 (diff) | |
download | gitpython-96c7ac239a2c9e303233e58daee02101cc4ebf3d.tar.gz |
Fixed incorrect handling of rev_parse if it was fed with branches that looked like hexshas. Thanks to Ning (frostyplanet) who pointed this issue out
Diffstat (limited to 'git/test/test_repo.py')
-rw-r--r-- | git/test/test_repo.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/git/test/test_repo.py b/git/test/test_repo.py index f517b9f1..deadbe9a 100644 --- a/git/test/test_repo.py +++ b/git/test/test_repo.py @@ -464,6 +464,12 @@ class TestRepo(TestBase): return orig_obj + @with_rw_repo('HEAD', bare=False) + def test_rw_rev_parse(self, rwrepo): + # verify it does not confuse branches with hexsha ids + ahead = rwrepo.create_head('aaaaaaaa') + assert(rwrepo.rev_parse(str(ahead)) == ahead.commit) + def test_rev_parse(self): rev_parse = self.rorepo.rev_parse @@ -573,7 +579,6 @@ class TestRepo(TestBase): # currently, nothing more is supported self.failUnlessRaises(NotImplementedError, rev_parse, "@{1 week ago}") - def test_repo_odbtype(self): target_type = GitDB if sys.version_info[1] < 5: |