doc: add shortcut to "am --whitespace=<action>"
PATCH 1/1 doc: add shortcut to "am --whitespace=<action>"
We refer readers of "git am --help" to "git apply --help" for many options that are passed through, and most of them are simple booleans, but --whitespace takes from a set of actions whose names may slip users' minds. Give a list of them in "git am --help" to reduce one level of redirection only to find out what they are.
In the helper function to parse the available options, there was a helpful comment reminding the developer to update list of <action>s in the completion script. Mention the two documentation pages there as well.
--- Documentation/git-am.txt | 3 +++ apply.c | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-)
Documentation/git-am.txt +3 -0
@@ -128,6 +128,9 @@ include::rerere-options.txt[] These flags are passed to the 'git apply' (see linkgit:git-apply[1]) program that applies the patch. ++ +Valid <action> for the `--whitespace` option are: +`nowarn`, `warn`, `fix`, `error`, and `error-all`. --patch-format:: By default the command will try to detect the patch format
apply.c +2 -1
@@ -78,7 +78,8 @@ static int parse_whitespace_option(struct apply_state *state, const char *optionreturn 0 ; }/* -* Please update $__git_whitespacelist in git-completion.bash +* Please update $__git_whitespacelist in git-completion.bash, +* Documentation/git-apply.txt, and Documentation/git-am.txt * when you add new options. */ return error (_ ("unrecognized whitespace option '%s'" ), option);
Signature · 1 line
2.44.0-rc1
Quoted 6 lines · Junio C Hamano
We refer readers of "git am --help" to "git apply --help" for many options that are passed through, and most of them are simple booleans, but --whitespace takes from a set of actions whose names may slip users' minds. Give a list of them in "git am --help" to reduce one level of redirection only to find out what they are.
Quoted 6 lines
In the helper function to parse the available options, there was a helpful comment reminding the developer to update list of <action>s in the completion script. Mention the two documentation pages there as well.
Signed-off-by Junio C Hamano <[email protected]>
Looking to me, with one small nitpick below.
Documentation/git-am.txt include::rerere-options.txt[] · line 130
Quoted 13 lines
--- Documentation/git-am.txt | 3 +++ apply.c | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-)Documentation/git-am.txt +0
-0@@ -128,6 +128,9 @@ include::rerere-options.txt[] These flags are passed to the 'git apply' (see linkgit:git-apply[1]) program that applies the patch.
It would be nice to, while there, move "the patch." to the line above.
Quoted 21 lines
Documentation/git-am.txt +3
-0++ +Valid <action> for the `--whitespace` option are: +`nowarn`, `warn`, `fix`, `error`, and `error-all`. --patch-format:: By default the command will try to detect the patch formatapply.c +0
-0@@ -78,7 +78,8 @@ static int parse_whitespace_option(struct
apply_state*state, const char *optionapply.c +2
-1return 0 ; }/* -* Please update $__git_whitespacelist in git-completion.bash +* Please update $__git_whitespacelist in git-completion.bash, +* Documentation/git-apply.txt, and Documentation/git-am.txt * when you add new options. */ return error (_ ("unrecognized whitespace option '%s'" ), option);
Quoted 7 lines · Dragan Simic
Quoted 6 lines · Junio C Hamano
We refer readers of "git am --help" to "git apply --help" for many options that are passed through, and most of them are simple booleans, but --whitespace takes from a set of actions whose names may slip users' minds. Give a list of them in "git am --help" to reduce one level of redirection only to find out what they are.
Quoted 8 lines
Quoted 6 lines
In the helper function to parse the available options, there was a helpful comment reminding the developer to update list of <action>s in the completion script. Mention the two documentation pages there as well.
Signed-off-by Junio C Hamano <[email protected]>Looking to me, with one small nitpick below.
Oops... s/to me/good to me/
Sorry for the noise.
Quoted 37 lines
Documentation/git-am.txt include::rerere-options.txt[] · line 130
Quoted 13 lines
--- Documentation/git-am.txt | 3 +++ apply.c | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-)Documentation/git-am.txt +0
-0@@ -128,6 +128,9 @@ include::rerere-options.txt[] These flags are passed to the 'git apply' (see linkgit:git-apply[1]) program that applies the patch.It would be nice to, while there, move "the patch." to the line above.
Quoted 21 lines
Documentation/git-am.txt +3
-0++ +Valid <action> for the `--whitespace` option are: +`nowarn`, `warn`, `fix`, `error`, and `error-all`. --patch-format:: By default the command will try to detect the patch formatapply.c +0
-0@@ -78,7 +78,8 @@ static int parse_whitespace_option(struct
apply_state*state, const char *optionapply.c +2
-1return 0 ; }/* -* Please update $__git_whitespacelist in git-completion.bash +* Please update $__git_whitespacelist in git-completion.bash, +* Documentation/git-apply.txt, and Documentation/git-am.txt * when you add new options. */ return error (_ ("unrecognized whitespace option '%s'" ), option);
Quoted 6 lines · Dragan Simic
Documentation/git-am.txt include::rerere-options.txt[] · line 130
Quoted 4 lines
Documentation/git-am.txt +0
-0@@ -128,6 +128,9 @@ include::rerere-options.txt[] These flags are passed to the 'git apply' (see linkgit:git-apply[1]) program that applies the patch.It would be nice to, while there, move "the patch." to the line above.
It belongs to a separate topic. These files are sources that will be line filled by AsciiDoc, so there is no reason to make such a change unless the topic of your change were to make the source "prettier", which is not the focus of this patch. Having such a change in the same patch will be distracting.
Quoted 10 lines · Junio C Hamano
Quoted 7 lines · Dragan Simic
Documentation/git-am.txt include::rerere-options.txt[] · line 131
Quoted 5 lines
Documentation/git-am.txt +0
-0@@ -128,6 +128,9 @@ include::rerere-options.txt[] These flags are passed to the 'git apply' (see linkgit:git-apply[1]) program that applies the patch.It would be nice to, while there, move "the patch." to the line above.
Quoted 5 lines
It belongs to a separate topic. These files are sources that will be line filled by AsciiDoc, so there is no reason to make such a change unless the topic of your change were to make the source "prettier", which is not the focus of this patch. Having such a change in the same patch will be distracting.
Makes sense, it can become distracting, especially in a short patch like this one. It's better to stick to the patch topic, and leave small cleanups to a separate patch.