git@vger.kernel.org list mirror (unofficial, one of many)
 help / color / mirror / code / Atom feed
* [PATCH] doc/diff-options: fix out of place mentions of '--patch/-p'
@ 2020-10-31 19:37 Sergey Organov
  2020-11-02 18:11 ` Junio C Hamano
  0 siblings, 1 reply; 2+ messages in thread
From: Sergey Organov @ 2020-10-31 19:37 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git, Sergey Organov

First, references to --patch and -p appeared in the description of
git-format-patch, where the options themselves are not included.

Next, the description of --unified option elsewhere had duplicate implied
statements: "Implies --patch. Implies -p."

Signed-off-by: Sergey Organov <sorganov@gmail.com>
---
 Documentation/diff-options.txt | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/Documentation/diff-options.txt b/Documentation/diff-options.txt
index 573fb9bb71e2..320304033483 100644
--- a/Documentation/diff-options.txt
+++ b/Documentation/diff-options.txt
@@ -36,9 +36,9 @@ endif::git-format-patch[]
 -U<n>::
 --unified=<n>::
 	Generate diffs with <n> lines of context instead of
-	the usual three. Implies `--patch`.
+	the usual three.
 ifndef::git-format-patch[]
-	Implies `-p`.
+	Implies `--patch`.
 endif::git-format-patch[]
 
 --output=<file>::
@@ -441,7 +441,10 @@ endif::git-format-patch[]
 
 --binary::
 	In addition to `--full-index`, output a binary diff that
-	can be applied with `git-apply`. Implies `--patch`.
+	can be applied with `git-apply`.
+ifndef::git-format-patch[]
+	Implies `--patch`.
+endif::git-format-patch[]
 
 --abbrev[=<n>]::
 	Instead of showing the full 40-byte hexadecimal object
-- 
2.25.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] doc/diff-options: fix out of place mentions of '--patch/-p'
  2020-10-31 19:37 [PATCH] doc/diff-options: fix out of place mentions of '--patch/-p' Sergey Organov
@ 2020-11-02 18:11 ` Junio C Hamano
  0 siblings, 0 replies; 2+ messages in thread
From: Junio C Hamano @ 2020-11-02 18:11 UTC (permalink / raw)
  To: Sergey Organov; +Cc: git

Sergey Organov <sorganov@gmail.com> writes:

> First, references to --patch and -p appeared in the description of
> git-format-patch, where the options themselves are not included.

Fun.  The -U<n> option in "git diff-index -U9" implicitly turns
"--patch" on, but it is hard to say that the same option in "git
format-patch -U9" turns "--patch" on, as it is in effect even
without the -U<n> option.

It makes readers wonder what, if anything, needs to be done for "git
diff -U9", but let's leave it out of the scope of this change, which
is strict improvement for "format-patch" documentation.

Thanks.

> Next, the description of --unified option elsewhere had duplicate implied
> statements: "Implies --patch. Implies -p."
>
> Signed-off-by: Sergey Organov <sorganov@gmail.com>
> ---
>  Documentation/diff-options.txt | 9 ++++++---
>  1 file changed, 6 insertions(+), 3 deletions(-)
>
> diff --git a/Documentation/diff-options.txt b/Documentation/diff-options.txt
> index 573fb9bb71e2..320304033483 100644
> --- a/Documentation/diff-options.txt
> +++ b/Documentation/diff-options.txt
> @@ -36,9 +36,9 @@ endif::git-format-patch[]
>  -U<n>::
>  --unified=<n>::
>  	Generate diffs with <n> lines of context instead of
> -	the usual three. Implies `--patch`.
> +	the usual three.
>  ifndef::git-format-patch[]
> -	Implies `-p`.
> +	Implies `--patch`.
>  endif::git-format-patch[]
>  
>  --output=<file>::
> @@ -441,7 +441,10 @@ endif::git-format-patch[]
>  
>  --binary::
>  	In addition to `--full-index`, output a binary diff that
> -	can be applied with `git-apply`. Implies `--patch`.
> +	can be applied with `git-apply`.
> +ifndef::git-format-patch[]
> +	Implies `--patch`.
> +endif::git-format-patch[]
>  
>  --abbrev[=<n>]::
>  	Instead of showing the full 40-byte hexadecimal object

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-11-02 18:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-31 19:37 [PATCH] doc/diff-options: fix out of place mentions of '--patch/-p' Sergey Organov
2020-11-02 18:11 ` Junio C Hamano

git@vger.kernel.org list mirror (unofficial, one of many)

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://public-inbox.org/git
	git clone --mirror http://ou63pmih66umazou.onion/git
	git clone --mirror http://czquwvybam4bgbro.onion/git
	git clone --mirror http://hjrcffqmbrq6wope.onion/git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V1 git git/ https://public-inbox.org/git \
		git@vger.kernel.org
	public-inbox-index git

Example config snippet for mirrors.
Newsgroups are available over NNTP:
	nntp://news.public-inbox.org/inbox.comp.version-control.git
	nntp://7fh6tueqddpjyxjmgtdiueylzoqt6pt7hec3pukyptlmohoowvhde4yd.onion/inbox.comp.version-control.git
	nntp://ie5yzdi7fg72h7s4sdcztq5evakq23rdt33mfyfcddc5u3ndnw24ogqd.onion/inbox.comp.version-control.git
	nntp://4uok3hntl7oi7b4uf4rtfwefqeexfzil2w6kgk2jn5z2f764irre7byd.onion/inbox.comp.version-control.git
	nntp://news.gmane.io/gmane.comp.version-control.git
 note: .onion URLs require Tor: https://www.torproject.org/

code repositories for project(s) associated with this inbox:

	https://80x24.org/mirrors/git.git

AGPL code for this site: git clone https://public-inbox.org/public-inbox.git