diff options
author | Joshua M. Clulow <josh@sysmgr.org> | 2018-10-22 12:18:58 -0700 |
---|---|---|
committer | Joshua M. Clulow <josh@sysmgr.org> | 2018-10-22 12:19:58 -0700 |
commit | 42a3762d0138d6dd0c0f96964be98d0b21ab6bef (patch) | |
tree | 07fff827b0cfd7ef5962b29f89f4ceae02f3f6b3 /usr/src | |
parent | bc4c0ff1343a311cc24933908ac6c4455af09031 (diff) | |
download | illumos-gate-42a3762d0138d6dd0c0f96964be98d0b21ab6bef.tar.gz |
9913 git pbchk should still accept -b
Reviewed by: Toomas Soome <tsoome@me.com>
Reviewed by: Andy Fiddaman <omnios@citrus-it.co.uk>
Approved by: Garrett D'Amore <garrett@damore.org>
Diffstat (limited to 'usr/src')
-rw-r--r-- | usr/src/tools/scripts/git-pbchk.py | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/usr/src/tools/scripts/git-pbchk.py b/usr/src/tools/scripts/git-pbchk.py index 0d3fc89f1e..7f3956ac42 100644 --- a/usr/src/tools/scripts/git-pbchk.py +++ b/usr/src/tools/scripts/git-pbchk.py @@ -375,27 +375,25 @@ def main(cmd, args): checkname = None try: - opts, args = getopt.getopt(args, 'c:p:') + opts, args = getopt.getopt(args, 'b:c:p:') except getopt.GetoptError, e: sys.stderr.write(str(e) + '\n') sys.stderr.write("Usage: %s [-c check] [-p branch] [path...]\n" % cmd) sys.exit(1) for opt, arg in opts: - # backwards compatibility - if opt == '-b': + # We accept "-b" as an alias of "-p" for backwards compatibility. + if opt == '-p' or opt == '-b': parent_branch = arg elif opt == '-c': checkname = arg - elif opt == '-p': - parent_branch = arg if not parent_branch: parent_branch = git_parent_branch(git_branch()) if checkname is None: if cmd == 'git-pbchk': - checkname= 'pbchk' + checkname = 'pbchk' else: checkname = 'nits' |