From: John Cai <johncai86@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: John Cai via GitGitGadget <gitgitgadget@gmail.com>, git@vger.kernel.org
Subject: Re: [PATCH] docs: link generating patch sections
Date: Fri, 13 Jan 2023 11:14:37 -0500 [thread overview]
Message-ID: <0DE08530-2F10-4656-9B50-E7B3CBD60D68@gmail.com> (raw)
In-Reply-To: <xmqqk030xfrd.fsf@gitster.g>
Hi Junio
On 9 Dec 2022, at 19:29, Junio C Hamano wrote:
> "John Cai via GitGitGadget" <gitgitgadget@gmail.com> writes:
>
>> diff --git a/Documentation/diff-options.txt b/Documentation/diff-options.txt
>> index 3674ac48e92..5acffdd129e 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 on
>> +ifdef::git-log[]
>> +<<_generating_patch_text_with_p, generating patches>>).
>
> Is this "prepend underscore, downcase, and replace each run of
> non-alnum with an underscore" ASCIIDoc magic? AsciiDoctor magic?
> All such backends prepare the anchor in the same format?
Yes, I believe this is asciidoc magic.
>
> I am mostly worried about relying on automatic magic that can
> silently be broken when say the title in diff-generate-patch.txt
> file is improved. Whoever is updating the file would not know
> it is being referenced from elsewhere (and it is hard to check).
>
> Or perhaps you forgot a single liner patch to diff-generate-patch.txt
> that adds [[_generating_patch_text_with_p]] anchor yourself?
Good point, adding an explicit anchor makes sense.
>
>> +endif::git-log[]
>> +ifndef::git-log[]
>> +Generate patch text with -p).
>
> The capitalization makes it look somewhat odd in the resulting
> text. Quoting, e.g.
>
> see the section titled "Generate patch text ..."
>
> may make it acceptable, though.
yeah I agree here--I can adjust this in the next version
thanks
John
>
>> +endif::git-log[]
>> ifdef::git-diff[]
>> This is the default.
>> endif::git-diff[]
>>
>> base-commit: 2e71cbbddd64695d43383c25c7a054ac4ff86882
next prev parent reply other threads:[~2023-01-13 16:22 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-09 19:41 [PATCH] docs: link generating patch sections John Cai via GitGitGadget
2022-12-10 0:29 ` Junio C Hamano
2023-01-13 16:14 ` John Cai [this message]
2023-01-13 16:15 ` [PATCH v2] " John Cai via GitGitGadget
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=0DE08530-2F10-4656-9B50-E7B3CBD60D68@gmail.com \
--to=johncai86@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitgitgadget@gmail.com \
--cc=gitster@pobox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).