diff options
author | David Aguilar <davvid@gmail.com> | 2008-09-02 22:05:44 -0700 |
---|---|---|
committer | David Aguilar <davvid@gmail.com> | 2008-09-02 22:05:44 -0700 |
commit | c231551328faa864848bde6ff8127f59c9566e90 (patch) | |
tree | 991ed402b4f6562209ea56550a3c5050d1aa0118 | |
parent | 8df638c22c75ddc9a43ecdde90c0c9939f5009e7 (diff) | |
download | gitpython-c231551328faa864848bde6ff8127f59c9566e90.tar.gz |
commit: handle --bisect-all output in Commit.list_from_string
Rui Abreu Ferrerira pointed out that "git rev-list --bisect-all"
returns a slightly different format which we can easily accomodate
by changing the way we parse rev-list output.
http://groups.google.com/group/git-python/browse_thread/thread/aed1d5c4b31d5027
This resolves the issue mentioned in that thread.
Signed-off-by: David Aguilar <davvid@gmail.com>
-rw-r--r-- | lib/git/commit.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/git/commit.py b/lib/git/commit.py index 2835e07f..d30d1250 100644 --- a/lib/git/commit.py +++ b/lib/git/commit.py @@ -139,17 +139,17 @@ class Commit(LazyMixin): commits = [] while lines: - id = lines.pop(0).split()[-1] - tree = lines.pop(0).split()[-1] + id = lines.pop(0).split()[1] + tree = lines.pop(0).split()[1] parents = [] - while lines and re.search(r'^parent', lines[0]): + while lines and lines[0].startswith('parent'): parents.append(lines.pop(0).split()[-1]) author, authored_date = cls.actor(lines.pop(0)) committer, committed_date = cls.actor(lines.pop(0)) messages = [] - while lines and re.search(r'^ {4}', lines[0]): + while lines and lines[0].startswith(' '): messages.append(lines.pop(0).strip()) message = messages and messages[0] or '' |