[PATCH v2] docs: link generating patch sections

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: John Cai <johncai86@xxxxxxxxx>

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@xxxxxxxxx>
---
    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 v1:
    
     * added explicit anchor for generating patch text section
     * adjusted verbiage to include quotations
    
    Signed-off-by: John Cai johncai86@xxxxxxxxx

Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-1392%2Fjohn-cai%2Fjc%2Fdoc-generate-patch-v2
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-1392/john-cai/jc/doc-generate-patch-v2
Pull-Request: https://github.com/git/git/pull/1392

Range-diff vs v1:

 1:  88e7e52fbc6 ! 1:  087f9b8d63a docs: link generating patch sections
     @@ Commit message
      
          Signed-off-by: John Cai <johncai86@xxxxxxxxx>
      
     + ## Documentation/diff-generate-patch.txt ##
     +@@
     ++[[generate_patch_text_with_p]]
     + Generating patch text with -p
     + -----------------------------
     + 
     +
       ## Documentation/diff-options.txt ##
      @@ Documentation/diff-options.txt: ifndef::git-format-patch[]
       -p::
       -u::
       --patch::
      -	Generate patch (see section on generating patches).
     -+	Generate patch (see section on
     ++	Generate patch (see section titled
      +ifdef::git-log[]
     -+<<_generating_patch_text_with_p, generating patches>>).
     ++<<generate_patch_text_with_p, "Generating patch text with -p">>).
      +endif::git-log[]
      +ifndef::git-log[]
     -+Generate patch text with -p).
     ++"Generating patch text with -p").
      +endif::git-log[]
       ifdef::git-diff[]
       	This is the default.


 Documentation/diff-generate-patch.txt | 1 +
 Documentation/diff-options.txt        | 8 +++++++-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/Documentation/diff-generate-patch.txt b/Documentation/diff-generate-patch.txt
index c78063d4f74..546adf79e5a 100644
--- a/Documentation/diff-generate-patch.txt
+++ b/Documentation/diff-generate-patch.txt
@@ -1,3 +1,4 @@
+[[generate_patch_text_with_p]]
 Generating patch text with -p
 -----------------------------
 
diff --git a/Documentation/diff-options.txt b/Documentation/diff-options.txt
index 3674ac48e92..7d73e976d99 100644
--- a/Documentation/diff-options.txt
+++ b/Documentation/diff-options.txt
@@ -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[]

base-commit: a38d39a4c50d1275833aba54c4dbdfce9e2e9ca1
-- 
gitgitgadget



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux