diff options
author | Sebastian Thiel <byronimo@gmail.com> | 2009-10-27 20:57:54 +0100 |
---|---|---|
committer | Sebastian Thiel <byronimo@gmail.com> | 2009-10-27 20:57:54 +0100 |
commit | 138aa2b8b413a19ebf9b2bbb39860089c4436001 (patch) | |
tree | f29dde05462e6d2d8d30957e9eb67163e4122d04 /lib/git/remote.py | |
parent | 038f183313f796dc0313c03d652a2bcc1698e78e (diff) | |
download | gitpython-138aa2b8b413a19ebf9b2bbb39860089c4436001.tar.gz |
Added non-fast forward test case, fixed parsing issue caused by initial line stripping
Diffstat (limited to 'lib/git/remote.py')
-rw-r--r-- | lib/git/remote.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/git/remote.py b/lib/git/remote.py index 36c71e7a..d4ca9eb3 100644 --- a/lib/git/remote.py +++ b/lib/git/remote.py @@ -68,7 +68,7 @@ class Remote(LazyMixin, Iterable): BRANCH_UPTODATE, REJECTED, FORCED_UPDATE, FAST_FORWARD, NEW_TAG, \ TAG_UPDATE, NEW_BRANCH, ERROR = [ 1 << x for x in range(1,9) ] # %c %-*s %-*s -> %s (%s) - re_fetch_result = re.compile("^(.) (\[?[\w\s\.]+\]?)\s+(.+) -> (.+/[\w_\.-]+)( \(.*\)?$)?") + re_fetch_result = re.compile("^\s*(.) (\[?[\w\s\.]+\]?)\s+(.+) -> (.+/[\w_\.-]+)( \(.*\)?$)?") _flag_map = { '!' : ERROR, '+' : FORCED_UPDATE, '-' : TAG_UPDATE, '*' : 0, '=' : BRANCH_UPTODATE, ' ' : FAST_FORWARD } @@ -110,7 +110,6 @@ class Remote(LazyMixin, Iterable): = means the head was up to date ( and not moved ) ' ' means a fast-forward """ - line = line.strip() match = cls.re_fetch_result.match(line) if match is None: raise ValueError("Failed to parse line: %r" % line) |