git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [PATCH 1/2] diff, log doc: say "patch text" instead of "patches"
@ 2019-09-15 16:55 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
  0 siblings, 2 replies; 6+ messages in thread
From: Johannes Sixt @ 2019-09-15 16:55 UTC (permalink / raw)
  To: Git Mailing List

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.

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>
---
 I do not have the toolchain to check that a correct result is produced.

 Documentation/diff-generate-patch.txt | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

diff --git a/Documentation/diff-generate-patch.txt b/Documentation/diff-generate-patch.txt
index f10ca410ad..c6bbb2ac22 100644
--- a/Documentation/diff-generate-patch.txt
+++ b/Documentation/diff-generate-patch.txt
@@ -1,11 +1,12 @@
-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] without the `--raw` option,
+or linkgit:git-log[1], linkgit:git-diff-index[1], linkgit:git-diff-tree[1],
+or linkgit:git-diff-files[1] with the `-p` option
+produces patch text instead of the usual output.
+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.93.g91d3f15def

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

* [PATCH 2/2] diff, log doc: small grammer, format, and language fixes
  2019-09-15 16:55 [PATCH 1/2] diff, log doc: say "patch text" instead of "patches" Johannes Sixt
@ 2019-09-15 16:57 ` Johannes Sixt
  2019-09-16 17:19 ` [PATCH 1/2] diff, log doc: say "patch text" instead of "patches" Martin Ågren
  1 sibling, 0 replies; 6+ messages in thread
From: Johannes Sixt @ 2019-09-15 16:57 UTC (permalink / raw)
  To: Git Mailing List

- Replace "SHA-1" by "object name", the modern name for hashes.

- Correct a few grammar weaknesses.

- Do not accidentally format a phrase in teletype font where quotes are
  intended.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
---
 I do not have the toolchain to check that a correct result is produced.

 Documentation/diff-generate-patch.txt | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/Documentation/diff-generate-patch.txt b/Documentation/diff-generate-patch.txt
index c6bbb2ac22..ece1a2b66e 100644
--- a/Documentation/diff-generate-patch.txt
+++ b/Documentation/diff-generate-patch.txt
@@ -50,7 +50,7 @@ similarity index value of 100% is thus reserved for two equal
 files, while 100% dissimilarity means that no line from the old
 file made it into the new one.
 +
-The index line includes the SHA-1 checksum before and after the change.
+The index line includes the blob object names before and after the change.
 The <mode> is included if the file mode does not change; otherwise,
 separate lines indicate the old and the new mode.
 
@@ -71,7 +71,7 @@ separate lines indicate the old and the new mode.
       rename to a
 
 
-combined diff format
+Combined diff format
 --------------------
 
 Any diff-generating command can take the `-c` or `--cc` option to
@@ -81,7 +81,7 @@ linkgit:git-show[1]. Note also that you can give the `-m` option to any
 of these commands to force generation of diffs with individual parents
 of a merge.
 
-A 'combined diff' format looks like this:
+A "combined diff" format looks like this:
 
 ------------
 diff --combined describe.c
@@ -114,11 +114,11 @@ index fabadb8,cc95eb0..4866510
 ------------
 
 1.   It is preceded with a "git diff" header, that looks like
-     this (when `-c` option is used):
+     this (when the `-c` option is used):
 
        diff --combined file
 +
-or like this (when `--cc` option is used):
+or like this (when the `--cc` option is used):
 
        diff --cc file
 
@@ -161,7 +161,7 @@ parents.
 4.   Chunk header format is modified to prevent people from
      accidentally feeding it to `patch -p1`. Combined diff format
      was created for review of merge commit changes, and was not
-     meant for apply. The change is similar to the change in the
+     meant to be applied. The change is similar to the change in the
      extended 'index' header:
 
        @@@ <from-file-range> <from-file-range> <to-file-range> @@@
-- 
2.23.0.93.g91d3f15def

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

* Re: [PATCH 1/2] diff, log doc: say "patch text" instead of "patches"
  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 ` Martin Ågren
  2019-09-16 19:58   ` Junio C Hamano
  1 sibling, 1 reply; 6+ messages in thread
From: Martin Ågren @ 2019-09-16 17:19 UTC (permalink / raw)
  To: Johannes Sixt; +Cc: Git Mailing List

On Sun, 15 Sep 2019 at 21:26, Johannes Sixt <j6t@kdbg.org> wrote:
>  I do not have the toolchain to check that a correct result is produced.

But I do. I've tested this patch and 2/2 with AsciiDoc 8.6.10 and
Asciidoctor 1.5.5, as well as with Asciidoctor 2.0.10 (on top of brian's
recent patch so that it builds to begin with). They all render this
nicely.

Both of these patches seem like good changes to me.

Martin

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

* Re: [PATCH 1/2] diff, log doc: say "patch text" instead of "patches"
  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     ` [PATCH v2 " Johannes Sixt
  0 siblings, 1 reply; 6+ messages in thread
From: Junio C Hamano @ 2019-09-16 19:58 UTC (permalink / raw)
  To: Martin Ågren; +Cc: Johannes Sixt, Git Mailing List

Martin Ågren <martin.agren@gmail.com> writes:

> On Sun, 15 Sep 2019 at 21:26, Johannes Sixt <j6t@kdbg.org> wrote:
>>  I do not have the toolchain to check that a correct result is produced.
>
> But I do. I've tested this patch and 2/2 with AsciiDoc 8.6.10 and
> Asciidoctor 1.5.5, as well as with Asciidoctor 2.0.10 (on top of brian's
> recent patch so that it builds to begin with). They all render this
> nicely.
>
> Both of these patches seem like good changes to me.

Thanks, both.  I am neutral between "patch" and "patch text", but if
the latter is more easily understood by readers, that would be
great.  "patch *file*" certainly does sound misleading.

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.

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...

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

* [PATCH v2 1/2] diff, log doc: say "patch text" instead of "patches"
  2019-09-16 19:58   ` Junio C Hamano
@ 2019-09-16 20:46     ` Johannes Sixt
  2019-09-17 18:40       ` Martin Ågren
  0 siblings, 1 reply; 6+ messages in thread
From: Johannes Sixt @ 2019-09-16 20:46 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Martin Ågren, Git Mailing List

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

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

* Re: [PATCH v2 1/2] diff, log doc: say "patch text" instead of "patches"
  2019-09-16 20:46     ` [PATCH v2 " Johannes Sixt
@ 2019-09-17 18:40       ` Martin Ågren
  0 siblings, 0 replies; 6+ messages in thread
From: Martin Ågren @ 2019-09-17 18:40 UTC (permalink / raw)
  To: Johannes Sixt; +Cc: Junio C Hamano, Git Mailing List

On Mon, 16 Sep 2019 at 22:46, Johannes Sixt <j6t@kdbg.org> wrote:
>
> 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.

Yeah, this makes sense. Tested -- this renders fine.

Martin

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

end of thread, other threads:[~2019-09-17 18:40 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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     ` [PATCH v2 " Johannes Sixt
2019-09-17 18:40       ` Martin Ågren

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).