Skip to content

Commit c231551

Browse files
committed
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>
1 parent 8df638c commit c231551

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/git/commit.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -139,17 +139,17 @@ def list_from_string(cls, repo, text):
139139
commits = []
140140

141141
while lines:
142-
id = lines.pop(0).split()[-1]
143-
tree = lines.pop(0).split()[-1]
142+
id = lines.pop(0).split()[1]
143+
tree = lines.pop(0).split()[1]
144144

145145
parents = []
146-
while lines and re.search(r'^parent', lines[0]):
146+
while lines and lines[0].startswith('parent'):
147147
parents.append(lines.pop(0).split()[-1])
148148
author, authored_date = cls.actor(lines.pop(0))
149149
committer, committed_date = cls.actor(lines.pop(0))
150150

151151
messages = []
152-
while lines and re.search(r'^ {4}', lines[0]):
152+
while lines and lines[0].startswith(' '):
153153
messages.append(lines.pop(0).strip())
154154

155155
message = messages and messages[0] or ''

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy