[PATCH] git-format-patch.txt: don't show -s as shorthand for multiple options

Subsystems: documentation, the rest

STALE3747d

2 messages, 1 author, 2016-06-16 · open the first message on its own page

[PATCH] git-format-patch.txt: don't show -s as shorthand for multiple options

From: Eric Sunshine <hidden>
Date: 2016-06-15 23:09:04

git-format-patch recognizes -s as shorthand only for --signoff, however,
its documentation shows -s as shorthand for both --signoff and
--no-patch. Resolve this confusion by suppressing the bogus -s shorthand
for --no-patch.

While here, also avoid showing the --no-patch option in git-format-patch
documentation since it doesn't make sense to ask to suppress the patch
while at the same time explicitly asking to format the patch (which,
after all, is the purpose of git-format-patch).

Reported-by: Kevin Brodsky <redacted>
Signed-off-by: Eric Sunshine <redacted>
---

I haven't quite managed to trace the code yet, but git-format-patch
oddly does recognize --no-patch, and it appears to act as an alias of
--no-stat. At any rate, --no-patch seems rather senseless with
git-format-patch, hence this patch suppresses it in documentation
altogether.

Documentation/diff-options.txt | 2 ++
 1 file changed, 2 insertions(+)
diff --git a/Documentation/diff-options.txt b/Documentation/diff-options.txt
index 306b7e3..6eb591f 100644
--- a/Documentation/diff-options.txt
+++ b/Documentation/diff-options.txt
@@ -28,10 +28,12 @@ ifdef::git-diff[]
 endif::git-diff[]
 endif::git-format-patch[]
 
+ifndef::git-format-patch[]
 -s::
 --no-patch::
 	Suppress diff output. Useful for commands like `git show` that
 	show the patch by default, or to cancel the effect of `--patch`.
+endif::git-format-patch[]
 
 -U<n>::
 --unified=<n>::
-- 
2.8.0.rc4.285.gc3ac548

Re: [PATCH] git-format-patch.txt: don't show -s as shorthand for multiple options

From: Eric Sunshine <hidden>
Date: 2016-06-16 02:18:39

Ping?

On Sun, Mar 27, 2016 at 5:26 PM, Eric Sunshine [off-list ref] wrote:
quoted hunk
git-format-patch recognizes -s as shorthand only for --signoff, however,
its documentation shows -s as shorthand for both --signoff and
--no-patch. Resolve this confusion by suppressing the bogus -s shorthand
for --no-patch.

While here, also avoid showing the --no-patch option in git-format-patch
documentation since it doesn't make sense to ask to suppress the patch
while at the same time explicitly asking to format the patch (which,
after all, is the purpose of git-format-patch).

Reported-by: Kevin Brodsky <redacted>
Signed-off-by: Eric Sunshine <redacted>
---

I haven't quite managed to trace the code yet, but git-format-patch
oddly does recognize --no-patch, and it appears to act as an alias of
--no-stat. At any rate, --no-patch seems rather senseless with
git-format-patch, hence this patch suppresses it in documentation
altogether.

Documentation/diff-options.txt | 2 ++
 1 file changed, 2 insertions(+)
diff --git a/Documentation/diff-options.txt b/Documentation/diff-options.txt
index 306b7e3..6eb591f 100644
--- a/Documentation/diff-options.txt
+++ b/Documentation/diff-options.txt
@@ -28,10 +28,12 @@ ifdef::git-diff[]
 endif::git-diff[]
 endif::git-format-patch[]

+ifndef::git-format-patch[]
 -s::
 --no-patch::
        Suppress diff output. Useful for commands like `git show` that
        show the patch by default, or to cancel the effect of `--patch`.
+endif::git-format-patch[]

 -U<n>::
 --unified=<n>::
--
2.8.0.rc4.285.gc3ac548
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help