Skip to content

Commit d716512

Browse files
rscharfegitster
authored andcommitted
subtree: disallow --no-{help,quiet,debug,branch,message}
"git subtree" only handles the negated variant of the options annotate, prefix, onto, rejoin, ignore-joins and squash explicitly. help is handled by "git rev-parse --parseopt" implicitly, but not its negated form. Disable negation for it and the for the rest of the options to get a helpful error message when trying them. Signed-off-by: René Scharfe <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent ac83bc5 commit d716512

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

contrib/subtree/git-subtree.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,19 +33,19 @@ git subtree split --prefix=<prefix> [<commit>]
3333
git subtree pull --prefix=<prefix> <repository> <ref>
3434
git subtree push --prefix=<prefix> <repository> <refspec>
3535
--
36-
h,help show the help
37-
q,quiet quiet
38-
d,debug show debug messages
36+
h,help! show the help
37+
q,quiet! quiet
38+
d,debug! show debug messages
3939
P,prefix= the name of the subdir to split out
4040
options for 'split' (also: 'push')
4141
annotate= add a prefix to commit message of new commits
42-
b,branch= create a new branch from the split subtree
42+
b,branch!= create a new branch from the split subtree
4343
ignore-joins ignore prior --rejoin commits
4444
onto= try connecting new tree to an existing one
4545
rejoin merge the new branch back into HEAD
4646
options for 'add' and 'merge' (also: 'pull', 'split --rejoin', and 'push --rejoin')
4747
squash merge subtree changes as a single commit
48-
m,message= use the given message as the commit message for the merge commit
48+
m,message!= use the given message as the commit message for the merge commit
4949
"
5050

5151
indent=0

0 commit comments

Comments
 (0)