mirror of
https://chromium.googlesource.com/chromium/tools/depot_tools.git
synced 2026-01-11 18:51:29 +00:00
map-branches: Fix crash with --show-subject when branch name matches files
Traceback (most recent call last):
...
File "...\\git_map_branches.py", line 303, in main
mapper.start()
File "...\\git_map_branches.py", line 169, in start
self.__append_branch(root)
File "...\\git_map_branches.py", line 272, in __append_branch
self.__append_branch(child, depth=depth + 1)
File "...\\git_map_branches.py", line 267, in __append_branch
line.append(run('log', '-n1', '--format=%s', branch))
File "...\git_common.py", line 599, in run
return run_with_stderr(*cmd, **kwargs)[0]
File "...\git_common.py", line 668, in run_with_stderr
raise subprocess2.CalledProcessError(retcode, cmd, os.getcwd(), ret, err)
subprocess2.CalledProcessError: Command '...\\git.bat -c color.ui=never log -n1 --format=%s readme' returned non-zero exit status 128 in ...
fatal: ambiguous argument 'readme': both revision and filename
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
BUG=
Review-Url: https://codereview.chromium.org/2153803002
This commit is contained in:
@@ -270,7 +270,7 @@ class BranchMapper(object):
|
||||
|
||||
# The subject of the most recent commit on the branch.
|
||||
if self.show_subject:
|
||||
line.append(run('log', '-n1', '--format=%s', branch))
|
||||
line.append(run('log', '-n1', '--format=%s', branch, '--'))
|
||||
|
||||
self.output.append(line)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user