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

Re: [PATCH 2/3] git.txt: fix monospace rendering

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 18, 2021, 18:51 UTC
Message-ID
<xmqqim6pgqev.fsf@gitster.g>
In-Reply-To
<97c686dd7ba1bbd1c0be6f7f61a3a033adf8adb6.1613590761.git.martin.agren@gmail.com>
Martin Ågren <martin.agren@gmail.com> writes:
Show 36 quoted lines
> When we write `<name>`s with the "s" tucked on to the closing backtick,
> we end up rendering the backticks literally. Rephrase this sentence
> slightly to render this as monospace.
>
> Signed-off-by: Martin Ågren <martin.agren@gmail.com>
> ---
>  doc-diff:
>  --- a/.../man/man1/git.1
>  +++ b/.../man/man1/git.1
>  @@ -77,8 +77,8 @@ OPTIONS
>              setting the value to an empty string, instead the environment
>              variable itself must be set to the empty string. It is an error if
>              the <envvar> does not exist in the environment.  <envvar> may not
>  -           contain an equals sign to avoid ambiguity with `<name>`s which
>  -           contain one.
>  +           contain an equals sign to avoid ambiguity with <name> containing
>  +           one.
>  
>              This is useful for cases where you want to pass transitory
>              configuration options to git, but are doing so on OS’s where other
>  Documentation/git.txt | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/Documentation/git.txt b/Documentation/git.txt
> index d36e6fd482..3a9c44987f 100644
> --- a/Documentation/git.txt
> +++ b/Documentation/git.txt
> @@ -88,7 +88,7 @@ foo.bar= ...`) sets `foo.bar` to the empty string which `git config
>  	empty string, instead the environment variable itself must be
>  	set to the empty string.  It is an error if the `<envvar>` does not exist
>  	in the environment. `<envvar>` may not contain an equals sign
> -	to avoid ambiguity with `<name>`s which contain one.
> +	to avoid ambiguity with `<name>` containing one.
>  +
>  This is useful for cases where you want to pass transitory
>  configuration options to git, but are doing so on OS's where
The "two" diffs may indeed be misleading.

The patch only changes one source and the "supporting material" is not something that we need to use on the source file---it is only showing the change in the output.

I did appreciate the inclusion of doc-diff myself, but it seems that it confused Chris and Patrick. I doubt that it is an improvement to omit doc-diff. We may want to find a way to make it easier for the readers to tell which part is the patch to be applied and which part is not in similar changes we discuss on the list in the future, and apparently, a one column indentation alone was not quite sufficient in this case. Replacing "doc-diff:" label and patch header lines up to the hunk header with a prose to explain what the intended diff is may have helped, e.g.

... slightly to render this as monospace.

Signed-off-by: A U Thor <au@thor.xz>
---
 The rendered output changes like the following excerpt from
 doc-diff output.
             ....  <envvar> may not
 -           contain an equals sign to avoid ambiguity with `<name>`s which
 -           contain one.
 +           contain an equals sign to avoid ambiguity with <name> containing
 +           one.
 You can see that backquotes are gone, even though you unfortunately
 cannot see how <name> is typeset (it is in monospace--trust me ;-).
 Documentation/git.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.... 
index ....
--- a/Documentation/git.txt
+++ b/Documentation/git.txt
@@ ...
Previous: Martin ÅgrenNext: Martin Ågren
Message 8 of 12 in “fix some doc rendering issues since v2.30.0”
  1. 0/3 fix some doc rendering issues since v2.30.0Martin Ågren, Feb 17, 2021
  2. 1/3 rev-list-options.txt: fix rendering of bonus paragraphMartin Ågren, Feb 17, 2021
  3. 2/3 git.txt: fix monospace renderingMartin Ågren, Feb 17, 2021
  4. Chris TorekFeb 17, 2021
  5. Martin ÅgrenFeb 18, 2021
  6. Patrick SteinhardtFeb 18, 2021
  7. Martin ÅgrenFeb 18, 2021
  8. Junio C HamanoFeb 18, 2021
  9. Martin ÅgrenFeb 19, 2021
  10. 3/3 gitmailmap.txt: fix rendering of e-mail addressesMartin Ågren, Feb 17, 2021
  11. Ævar Arnfjörð BjarmasonFeb 18, 2021
  12. Junio C HamanoFeb 17, 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.