summaryrefslogtreecommitdiff
path: root/lib/git/commit.py
diff options
context:
space:
mode:
authorDavid Aguilar <davvid@gmail.com>2008-09-02 22:05:44 -0700
committerDavid Aguilar <davvid@gmail.com>2008-09-02 22:05:44 -0700
commitc231551328faa864848bde6ff8127f59c9566e90 (patch)
tree991ed402b4f6562209ea56550a3c5050d1aa0118 /lib/git/commit.py
parent8df638c22c75ddc9a43ecdde90c0c9939f5009e7 (diff)
downloadgitpython-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>
Diffstat (limited to 'lib/git/commit.py')
-rw-r--r--lib/git/commit.py8
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 ''