mirror of
https://chromium.googlesource.com/chromium/tools/depot_tools.git
synced 2026-01-11 10:41:31 +00:00
git-map-branches: Fix --show-subject for branches that are gone
Without this change, the script would try to query the subject of
branches that no longer exist (these are shown as
`{branch-name:GONE}` in the output of the command).
Bug: None
Change-Id: Ia8dafe428654a1ab995dcd0be794e6fd9e25bc7a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4078970
Commit-Queue: Christian Flach <cmfcmf@chromium.org>
Reviewed-by: Joanna Wang <jojwang@chromium.org>
This commit is contained in:
@@ -288,7 +288,7 @@ class BranchMapper(object):
|
||||
|
||||
# The subject of the most recent commit on the branch.
|
||||
if self.show_subject:
|
||||
if branch:
|
||||
if not self.__is_invalid_parent(branch):
|
||||
line.append(run('log', '-n1', '--format=%s', branch, '--'))
|
||||
else:
|
||||
line.append('')
|
||||
|
||||
Reference in New Issue
Block a user