Allow 'main' as a local main branch name.

Avoiding 'master' as a local branch name per naming guidelines hits this
special case and won't allow upload of child branches. Even though more
comprehensive efforts (crbug.com/1095735) have yet to decide on an
official preferred main branch name this change is small and unlikely
to break things (I hope).

This supports people using a "git pull" "merge" workflow.

Change-Id: I8aca044aeb4178c6671e3a1590617f666505b42e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2377189
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
Auto-Submit: Glen Robertson <glenrob@chromium.org>
changes/89/2377189/3
Glen Robertson 5 years ago committed by LUCI CQ
parent b92c4b7b72
commit 7d98e228f8

@ -2360,6 +2360,8 @@ class Changelist(object):
if upstream_branch_name == 'master':
return self.GetCommonAncestorWithUpstream()
if upstream_branch_name == 'main':
return self.GetCommonAncestorWithUpstream()
# Check the squashed hash of the parent.
# TODO(tandrii): consider checking parent change in Gerrit and using its

Loading…
Cancel
Save