Commit b038f724 authored by Josip Sokcevic's avatar Josip Sokcevic Committed by LUCI CQ

Update error message if unable to determine branch

git cl format can't accept branch name as argument as those are reserved
for files that need to be formatted. This CL clarifies what user needs
to do in case git cl is not able to determine upstream branch.

R=apolito@google.com, ehmaldonaldo@chromium.org

Bug: 832295
Change-Id: If6ff517d633b7e70a33dff48f3779f82df30f214
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2571838Reviewed-by: 's avatarAnthony Polito <apolito@google.com>
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
parent 276bab4c
......@@ -1040,10 +1040,10 @@ class Changelist(object):
if not remote or not upstream_branch:
DieWithError(
'Unable to determine default branch to diff against.\n'
'Either pass complete "git diff"-style arguments, like\n'
' git cl upload origin/main\n'
'or verify this branch is set up to track another \n'
'(via the --track argument to "git checkout -b ...").')
'Verify this branch is set up to track another \n'
'(via the --track argument to "git checkout -b ..."). \n'
'or pass complete "git diff"-style arguments if supported, like\n'
' git cl upload origin/main\n')
return remote, upstream_branch
......
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