summaryrefslogtreecommitdiff
path: root/usr/src/tools/scripts/git-pbchk.py
diff options
context:
space:
mode:
authorJerry Jelinek <jerry.jelinek@joyent.com>2018-10-23 13:07:51 +0000
committerJerry Jelinek <jerry.jelinek@joyent.com>2018-10-23 13:07:51 +0000
commitffe74e17db37f9d0aa120a35a5cfcf2d7342dadb (patch)
tree1a2afc52bc0e46bafd28b1ef2ce737a817e1e864 /usr/src/tools/scripts/git-pbchk.py
parent474a8f549c7e430ac55a4b1b8a1fe7be51478412 (diff)
parentd0843a33a8ba49c316537132aa23e7df6d6fc64b (diff)
downloadillumos-joyent-ffe74e17db37f9d0aa120a35a5cfcf2d7342dadb.tar.gz
[illumos-gate merge]
commit d0843a33a8ba49c316537132aa23e7df6d6fc64b 9899 cw(1onbld) should shadow more compilation 9888 cw shouldn't use __unused commit 42a3762d0138d6dd0c0f96964be98d0b21ab6bef 9913 git pbchk should still accept -b Conflicts: usr/src/tools/cw/cw.c
Diffstat (limited to 'usr/src/tools/scripts/git-pbchk.py')
-rw-r--r--usr/src/tools/scripts/git-pbchk.py10
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'