Clean up all references to branchauthor after removal of usage

Since it's no longer used in Ib83981a4952e1d6d68ebb8add11aabefbf3b2a4b.

This approximately reverts Ieed465f69ed0c0864979a92f609bd8f58cd8e883.

Change-Id: I4ded027a4f9b6fa53207f3df14d5b8828bfc4a65
This commit is contained in:
Jingyuan Liang
2025-06-01 06:48:35 +00:00
parent a3be713b85
commit c33de81730
2 changed files with 2 additions and 29 deletions

View File

@@ -54,7 +54,7 @@ GLOBAL_CONFIG = "/etc/git-review/git-review.conf"
USER_CONFIG = os.path.join(CONFIGDIR, "git-review.conf")
DEFAULTS = dict(scheme='ssh', hostname=False, port=None, project=False,
branch='master', remote="gerrit", rebase="1",
track="0", usepushurl="0", notopic=True, branchauthor="name")
track="0", usepushurl="0", notopic=True)
LOCAL_GIT_VERSION = (0, 0, 0)
COPYRIGHT = """\
Copyright OpenStack Foundation and OpenDev Contributors
@@ -85,7 +85,6 @@ _use_color = None
_orig_head = None
_rewrites = None
_rewrites_push = None
BRANCHAUTHOR = None
class colors(object):
@@ -828,7 +827,6 @@ def load_config_file(config_file):
'track': 'track',
'notopic': 'notopic',
'usepushurl': 'usepushurl',
'branchauthor': 'branchauthor',
}
config = {}
for config_key, option_name in options.items():
@@ -1549,19 +1547,7 @@ git-review is a tool that helps submitting git branches to gerrit for
review.
"""
epilog = """\
additional information:
Options configurable using: git config --global gitreview.OPTION VALUE
branchauthor name (default), username, email
"""
parser = argparse.ArgumentParser(
usage=usage,
description=description,
formatter_class=argparse.RawDescriptionHelpFormatter,
epilog=epilog)
parser = argparse.ArgumentParser(usage=usage, description=description)
topic_arg_group = parser.add_mutually_exclusive_group()
topic_arg_group.add_argument("-t", "--topic", dest="topic",
@@ -1776,13 +1762,6 @@ additional information:
yes = options.yes
status = 0
global BRANCHAUTHOR
BRANCHAUTHOR = config['branchauthor']
if BRANCHAUTHOR not in ["name", "email", "username"]:
warn("Invalid gitreview.branchauthor: %s (using default: %s)"
% (BRANCHAUTHOR, DEFAULTS["branchauthor"]))
BRANCHAUTHOR = DEFAULTS["branchauthor"]
if options.track:
remote, branch = resolve_tracking(remote, branch)