Skip to content

Commit ebdc46c

Browse files
john-caigitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent c48035d commit ebdc46c

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

Documentation/diff-generate-patch.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
[[generate_patch_text_with_p]]
12
Generating patch text with -p
23
-----------------------------
34

Documentation/diff-options.txt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,13 @@ ifndef::git-format-patch[]
2222
-p::
2323
-u::
2424
--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[]
2632
ifdef::git-diff[]
2733
This is the default.
2834
endif::git-diff[]

0 commit comments

Comments
 (0)