git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH v2 1/1] doc/diff-options: fix link to generating patch section

From
Sergey Organov <sorganov@gmail.com>
Date
Sep 6, 2023, 07:15 UTC
Message-ID
<87msxzpybo.fsf_-_@osv.gnss.ru>
In-Reply-To
<xmqq34zsqlr3.fsf@gitster.g>

When formatted as man-page, the section title is rendered "GENERATING PATCH TEXT WITH -P" whereas reference still reads "Generating patch text with -p", that is inconsistent and makes searching harder than it needs to be.

Fix this by getting rid of custom reference text.

Also, documentation for every command that describes `-p` option by including the "diff-options.txt" file does include the "diff-generate-patch.txt" file as well (as it should), so the internal link is in fact useful for any of them.

Fix this by getting rid of conditionals around the reference.
Fixes: ebdc46c242 (docs: link generating patch sections)
Signed-off-by: Sergey Organov <sorganov@gmail.com>
---
 Documentation/diff-options.txt | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/Documentation/diff-options.txt b/Documentation/diff-options.txt
index 9f33f887711d..c07488b123c6 100644
--- a/Documentation/diff-options.txt
+++ b/Documentation/diff-options.txt
@@ -22,13 +22,7 @@ ifndef::git-format-patch[]
 -p::
 -u::
 --patch::
-	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[]
+	Generate patch (see <<generate_patch_text_with_p>>).
 ifdef::git-diff[]
 	This is the default.
 endif::git-diff[]
-- 
2.25.1
Previous: Junio C Hamano
Message 6 of 6 in “doc/diff-options: fix link to generating patch section”
  1. 1/1 doc/diff-options: fix link to generating patch sectionSergey Organov, Sep 5, 2023
  2. Junio C HamanoSep 5, 2023
  3. Sergey OrganovSep 6, 2023
  4. Sergey OrganovSep 6, 2023
  5. Junio C HamanoSep 6, 2023
  6. 1/1 doc/diff-options: fix link to generating patch sectionSergey Organov, Sep 6, 2023

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.