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/+/2571838
Reviewed-by: Anthony Polito <apolito@google.com>
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
diff --git a/git_cl.py b/git_cl.py
index f004caf..dae4a83 100755
--- a/git_cl.py
+++ b/git_cl.py
@@ -1040,10 +1040,10 @@
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