From c33de81730230c7d34b662a0bff3b1c0b2915af9 Mon Sep 17 00:00:00 2001 From: Jingyuan Liang Date: Sun, 1 Jun 2025 06:48:35 +0000 Subject: [PATCH] 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 --- git-review.1 | 6 ------ git_review/cmd.py | 25 ++----------------------- 2 files changed, 2 insertions(+), 29 deletions(-) diff --git a/git-review.1 b/git-review.1 index 2217bfa8..6499ad5b 100644 --- a/git-review.1 +++ b/git-review.1 @@ -332,12 +332,6 @@ This setting takes precedence over repository\-specific configuration in the .Pa .gitreview file. -.It gitreview.branchauthor -This setting changes the look of the author part when naming the local -branch of a downloaded change. Value must be one of "name", "email", -or "username". Default is "name". See also the -.Fl \-download -option. .El .Bl -tag .It color.review diff --git a/git_review/cmd.py b/git_review/cmd.py index deaa380a..7cb1b2ee 100644 --- a/git_review/cmd.py +++ b/git_review/cmd.py @@ -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)