]> git.ipfire.org Git - thirdparty/git.git/commitdiff
docs: link generating patch sections
authorJohn Cai <johncai86@gmail.com>
Fri, 13 Jan 2023 16:15:24 +0000 (16:15 +0000)
committerJunio C Hamano <gitster@pobox.com>
Fri, 13 Jan 2023 20:55:14 +0000 (12:55 -0800)
Currently, in the git-log documentation, the reference to generating
patches does not match the section title. This can make the section
"Generating patch text with -p" hard to find, since typically readers of
the documentation will copy and paste to search the page.

Let's make this more convenient for readers by linking it directly to
the section.

Since git-log pulls in diff-generate-patch.txt, we can provide a direct
link to the section. Otherwise, change the verbiage to match exactly
what the section title is, to at least make searching for it an easier
task.

Signed-off-by: John Cai <johncai86@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/diff-generate-patch.txt
Documentation/diff-options.txt

index c78063d4f74a30dc58c98a7af5db7fcdeeab69f3..546adf79e5a52cf100c71154bb9710cc5c68aaf6 100644 (file)
@@ -1,3 +1,4 @@
+[[generate_patch_text_with_p]]
 Generating patch text with -p
 -----------------------------
 
index 3674ac48e92c29e2a9fe5db0ccf8ce72e7727290..7d73e976d9936bb35981ad7f64b0af66865491b8 100644 (file)
@@ -22,7 +22,13 @@ ifndef::git-format-patch[]
 -p::
 -u::
 --patch::
-       Generate patch (see section on generating patches).
+       Generate patch (see section titled
+ifdef::git-log[]
+<<generate_patch_text_with_p, "Generating patch text with -p">>).
+endif::git-log[]
+ifndef::git-log[]
+"Generating patch text with -p").
+endif::git-log[]
 ifdef::git-diff[]
        This is the default.
 endif::git-diff[]