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

Re: [PATCH 3/6] git-check-ref-format.txt: avoid single quote

From
MÅMartin Ågren <martin.agren@gmail.com>
Date
May 14, 2021, 09:07 UTC
Message-ID
<CAN0heSqsrUU=GYsckhZT7Dvx=Rh3aWMMTMBLBfy2XuDWYpQPFg@mail.gmail.com>
In-Reply-To
<xmqqzgwy8faq.fsf@gitster.g>
On Fri, 14 May 2021 at 00:00, Junio C Hamano <gitster@pobox.com> wrote:
Show 8 quoted lines
>
> Martin Ågren <martin.agren@gmail.com> writes:
>
> > Asciidoctor renders 'git cat-file' with the single quotes.
>
> I somehow find this sentence a bit hard to grok.  Do you mean
> "instead of typesetting them emphasized, the two-word phrase is
> enclosed in a pair of literal single quotes"?
Yes. I will improve the description.
> I have no problem with this particular rephrasing from "srcref's
> value" to "value of srcref", but forbidding possessive "'s" from any
> future documentation is troubling.

I think this is a case of several things going on in one paragraph in a way that confuses the tool. As Felipe commented, it's probably correct to call it out as an Asciidoctor bug. If we hit is *once* across all our documentation, I think it's correct to work around it [and report the bug, if we can], but not let the experience impose a blanket rule on ourselves that we mustn't do anything that even resembles this paragraph.

Show 12 quoted lines
> > -. A colon `:` is used as in `srcref:dstref` to mean "use srcref\'s
> > -  value and store it in dstref" in fetch and push operations.
> > +. A colon `:` is used as in `srcref:dstref` to mean "use the value
> > +  of `srcref` and store it in `dstref`" in fetch and push operations.
> >    It may also be used to select a specific object such as with
> > -  'git cat-file': "git cat-file blob v1.3.3:refs.c".
> > +  'git cat-file': `git cat-file blob v1.3.3:refs.c`.
>
> The proposed log message did not explain why you wanted to avoid
> double-quote pair on the "cat-file" line.  Is this meant as a
> workaround for the "single quotes are shown around git cat-file"
> issue?

Hmm, I've somehow tended to think that it's 'git foo' the tool and `git foo --bar baz` the actual invocation. SQs for the former, backticks for the latter. Like, `git cat-file` is not a correct invocation of 'git cat-file'. But I think I'm starting to see the error in my ways -- CodingGuidelines says to use backticks around command names, so it really should be `git cat-file`. And changing that might just happen to avoid the issue that triggered this patch.

Thanks for your comments.
Martin
Previous: Junio C HamanoNext: Felipe Contreras
Message 8 of 22 in “AsciiDoc vs Asciidoctor, once again”
  1. 0/6 AsciiDoc vs Asciidoctor, once againMartin Ågren, May 13, 2021
  2. 1/6 git-http-push.txt,git-send-pack.txt: avoid single quoteMartin Ågren, May 13, 2021
  3. 2/6 git-range-diff.txt: avoid single quotesMartin Ågren, May 13, 2021
  4. 3/6 git-check-ref-format.txt: avoid single quoteMartin Ågren, May 13, 2021
  5. Eric SunshineMay 13, 2021
  6. Martin ÅgrenMay 13, 2021
  7. Junio C HamanoMay 13, 2021
  8. Martin ÅgrenMay 14, 2021
  9. Felipe ContrerasMay 14, 2021
  10. Jeff KingMay 14, 2021
  11. Martin ÅgrenMay 14, 2021
  12. 4/6 diff-options.txt: move monospace markup out of attributeMartin Ågren, May 13, 2021
  13. 5/6 git-svn.txt: change verse to listing blockMartin Ågren, May 13, 2021
  14. 6/6 Doc: use two backticks for monospace, not backtick+apostropheMartin Ågren, May 13, 2021
  15. Junio C HamanoMay 13, 2021
  16. Martin ÅgrenMay 14, 2021
  17. Felipe ContrerasMay 14, 2021
  18. Felipe ContrerasMay 14, 2021
  19. Martin ÅgrenMay 14, 2021
  20. Felipe ContrerasMay 14, 2021
  21. Martin ÅgrenMay 14, 2021
  22. Felipe ContrerasMay 14, 2021

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.