Commit 6761b9df authored by Aaron Gable's avatar Aaron Gable Committed by Commit Bot

git-map-branches: support no-parent when showing subjects

If one of the "branches" being shown by 'git map-branches' is
the pseudo-branch "{NO_UPSTREAM}", and the user has asked the
command to print the subject line of each branch, it would
crash. This change causes it to gracefully handle that case.

R=lgarron@chromium.org

Bug: 758428
Change-Id: Id0ff1c6fd90b5efbb07e118ae088e3999c234b67
Reviewed-on: https://chromium-review.googlesource.com/639190Reviewed-by: 's avatarRobbie Iannucci <iannucci@chromium.org>
Commit-Queue: Aaron Gable <agable@chromium.org>
parent 0925fa70
......@@ -269,7 +269,10 @@ class BranchMapper(object):
# The subject of the most recent commit on the branch.
if self.show_subject:
if branch:
line.append(run('log', '-n1', '--format=%s', branch, '--'))
else:
line.append('')
self.output.append(line)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment