docs: link generating patch sections

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>

John Cai committed Jan 13, 2023 at 16:15 UTC ebdc46c242ac53d73295ba8953456b571dbad322
2 files changed +8 -1
Documentation/diff-generate-patch.txt
+1
@@ -1,3 +1,4 @@
1 +[[generate_patch_text_with_p]]
2 Generating patch text with -p
3 -----------------------------
4
Documentation/diff-options.txt
+7 -1
@@ -22,7 +22,13 @@ ifndef::git-format-patch[]
22 -p::
23 -u::
24 --patch::
25 - Generate patch (see section on generating patches).
25 + Generate patch (see section titled
26 +ifdef::git-log[]
27 +<<generate_patch_text_with_p, "Generating patch text with -p">>).
28 +endif::git-log[]
29 +ifndef::git-log[]
30 +"Generating patch text with -p").
31 +endif::git-log[]
32 ifdef::git-diff[]
33 This is the default.
34 endif::git-diff[]