From e7fa5ef735754e640bd6be6c0a77088009058d74 Mon Sep 17 00:00:00 2001 From: Orestis Markou Date: Sun, 1 May 2011 14:33:41 +0300 Subject: [PATCH 0001/1274] added test & fix for mangled tagger names --- git/objects/tag.py | 2 +- git/test/test_refs.py | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/git/objects/tag.py b/git/objects/tag.py index c7d02abe7..25eec896d 100644 --- a/git/objects/tag.py +++ b/git/objects/tag.py @@ -58,7 +58,7 @@ def _set_cache_(self, attr): self.tag = lines[2][4:] # tag - tagger_info = lines[3][7:]# tagger + tagger_info = lines[3]# tagger self.tagger, self.tagged_date, self.tagger_tz_offset = parse_actor_and_date(tagger_info) # line 4 empty - it could mark the beginning of the next header diff --git a/git/test/test_refs.py b/git/test/test_refs.py index 2338b4e43..f04738715 100644 --- a/git/test/test_refs.py +++ b/git/test/test_refs.py @@ -49,6 +49,16 @@ def test_tag_base(self): # END for tag in repo-tags assert tag_object_refs assert isinstance(self.rorepo.tags['0.1.5'], TagReference) + + + def test_tags_author(self): + tag = self.rorepo.tags[0] + tagobj = tag.tag + assert isinstance( tagobj.tagger, Actor ) + tagger_name = tagobj.tagger.name + assert tagger_name == 'Michael Trier' + + def test_tags(self): # tag refs can point to tag objects or to commits From 096897123ab5d8b500024e63ca81b658f3cb93da Mon Sep 17 00:00:00 2001 From: Julien Miotte Date: Thu, 19 May 2011 17:11:36 +0200 Subject: [PATCH 0002/1274] Making comparisons with non-GitPython objects more tolerant. --- git/objects/base.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/git/objects/base.py b/git/objects/base.py index 5f2f78093..9c1a0bb92 100644 --- a/git/objects/base.py +++ b/git/objects/base.py @@ -77,10 +77,14 @@ def _set_cache_(self, attr): def __eq__(self, other): """:return: True if the objects have the same SHA1""" + if not hasattr(other, 'binsha'): + return False return self.binsha == other.binsha def __ne__(self, other): """:return: True if the objects do not have the same SHA1 """ + if not hasattr(other, 'binsha'): + return True return self.binsha != other.binsha def __hash__(self): From ea5d365a93a98907a1d7c25d433efd06a854109e Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Mon, 14 Feb 2011 16:55:53 -0700 Subject: [PATCH 0003/1274] Match any number of leading spaces in config values The regex comments state that any number of leading tabs or spaces should be allowed, however the regex was only catching zero or one space. This allows multiple spaces. --- git/config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git/config.py b/git/config.py index f1a8832e1..209f2ffef 100644 --- a/git/config.py +++ b/git/config.py @@ -124,7 +124,7 @@ class GitConfigParser(cp.RawConfigParser, object): #} END configuration OPTCRE = re.compile( - r'\s?(?P