git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Johannes Sixt <j6t@kdbg.org>
To: Junio C Hamano <gitster@pobox.com>
Cc: "Martin Ågren" <martin.agren@gmail.com>,
	"Git Mailing List" <git@vger.kernel.org>
Subject: [PATCH v2 1/2] diff, log doc: say "patch text" instead of "patches"
Date: Mon, 16 Sep 2019 22:46:21 +0200	[thread overview]
Message-ID: <76602d23-f2b2-4a15-21ad-7bd91a4b5e44@kdbg.org> (raw)
In-Reply-To: <xmqqv9ts9fox.fsf@gitster-ct.c.googlers.com>

Am 16.09.19 um 21:58 schrieb Junio C Hamano:
> I wonder if the result becomes even clearer if we dropped "instead
> of the usual output".  It is a given that presence of an option
> would change the behaviour, so "instead of the usual" does not add
> any value in the context of the explanation we are giving.

Agreed.

> Also I question the value of the "running git diff without --raw
> option" sentence; "diff --stat" is also a way to suppress the patch
> text and see only the overview; I know it is not a new problem this
> patch introduces, but the objective of this patch is clarify about
> the generation of output in patch format, so...

You have a point here, too.

Below is v2 of just patch 1/2. 2/2 remains unchanged. I've added
git-show to the enumeration.

--- 8< ---
diff, log doc: say "patch text" instead of "patches"

A poster on Stackoverflow was confused that the documentation of git-log
promised to generate "patches" or "patch files" with -p, but there were
none to be found. Rewrite the corresponding paragraph to talk about
"patch text" to avoid the confusion.

Shorten the language to say "X does Y" in place of "X does not Z, but Y".

Cross-reference the referred-to commands like the rest of the file does.

Enumerate git-show because it includes the description as well.

Mention porcelain commands before plumbing commands because I guess that
the paragraph is read more frequently in their context.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
---
 Documentation/diff-generate-patch.txt | 20 ++++++++++++--------
 1 file changed, 12 insertions(+), 8 deletions(-)

diff --git a/Documentation/diff-generate-patch.txt b/Documentation/diff-generate-patch.txt
index f10ca410ad..c482c94e6b 100644
--- a/Documentation/diff-generate-patch.txt
+++ b/Documentation/diff-generate-patch.txt
@@ -1,11 +1,15 @@
-Generating patches with -p
---------------------------
-
-When "git-diff-index", "git-diff-tree", or "git-diff-files" are run
-with a `-p` option, "git diff" without the `--raw` option, or
-"git log" with the "-p" option, they
-do not produce the output described above; instead they produce a
-patch file.  You can customize the creation of such patches via the
+Generating patch text with -p
+-----------------------------
+
+Running
+linkgit:git-diff[1],
+linkgit:git-log[1],
+linkgit:git-show[1],
+linkgit:git-diff-index[1],
+linkgit:git-diff-tree[1], or
+linkgit:git-diff-files[1]
+with the `-p` option produces patch text.
+You can customize the creation of patch text via the
 `GIT_EXTERNAL_DIFF` and the `GIT_DIFF_OPTS` environment variables.
 
 What the -p option produces is slightly different from the traditional
-- 
2.23.0.95.gcfbaf7d16f

  reply	other threads:[~2019-09-16 20:46 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-15 16:55 [PATCH 1/2] diff, log doc: say "patch text" instead of "patches" Johannes Sixt
2019-09-15 16:57 ` [PATCH 2/2] diff, log doc: small grammer, format, and language fixes Johannes Sixt
2019-09-16 17:19 ` [PATCH 1/2] diff, log doc: say "patch text" instead of "patches" Martin Ågren
2019-09-16 19:58   ` Junio C Hamano
2019-09-16 20:46     ` Johannes Sixt [this message]
2019-09-17 18:40       ` [PATCH v2 " Martin Ågren

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=76602d23-f2b2-4a15-21ad-7bd91a4b5e44@kdbg.org \
    --to=j6t@kdbg.org \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=martin.agren@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).