From 096897123ab5d8b500024e63ca81b658f3cb93da Mon Sep 17 00:00:00 2001 From: Julien Miotte Date: Thu, 19 May 2011 17:11:36 +0200 Subject: [PATCH 0001/1273] 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 0002/1273] 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