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 <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>

René Scharfe committed Aug 5, 2023 at 16:37 UTC d716512870317692129b2b4d706a82b393ffbe6e
1 file changed +5 -5
contrib/subtree/git-subtree.sh
+5 -5
@@ -33,19 +33,19 @@ git subtree split --prefix=<prefix> [<commit>]
33 git subtree pull --prefix=<prefix> <repository> <ref>
34 git subtree push --prefix=<prefix> <repository> <refspec>
35 --
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
39 P,prefix= the name of the subdir to split out
40 options for 'split' (also: 'push')
41 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
43 ignore-joins ignore prior --rejoin commits
44 onto= try connecting new tree to an existing one
45 rejoin merge the new branch back into HEAD
46 options for 'add' and 'merge' (also: 'pull', 'split --rejoin', and 'push --rejoin')
47 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
49 "
50
51 indent=0