# [PATCH 0/2] documentation fixes for 2.48.0

6 messages from 2025-01-03 to 2025-01-03. Participants: Martin Ågren, Eric Sunshine, Junio C Hamano.
Thread: https://gitlist.dev/t/62729

## Martin Ågren, 2025-01-03 11:33

Subject: [PATCH 0/2] documentation fixes for 2.48.0
Message-ID: <cover.1735903029.git.martin.agren@gmail.com>
URL: https://gitlist.dev/e/cover.1735903029.git.martin.agren%40gmail.com

```
These two patches fix some misrenderings of the built documentation,
introduced during the 2.48 cycle. As usual, the exact current behaviors
(symptoms) differ a bit between AsciiDoc and Asciidoctor.

Martin

Martin Ågren (2):
  git.txt: fix heading line of tildes
  gitcli.txt: typeset pathnames as monospace

 Documentation/git.txt    | 2 +-
 Documentation/gitcli.txt | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

-- 
2.48.0.rc1.241.g6c04ab211c


```

## Martin Ågren, 2025-01-03 11:33

Subject: [PATCH 1/2] git.txt: fix heading line of tildes
Message-ID: <50e47d14a8a0a2ca0dd158f01b833a28c7b46887.1735903029.git.martin.agren@gmail.com>
URL: https://gitlist.dev/e/50e47d14a8a0a2ca0dd158f01b833a28c7b46887.1735903029.git.martin.agren%40gmail.com
In-Reply-To: <cover.1735903029.git.martin.agren@gmail.com>

```
The two-line heading added in 8525e92886 (Document HOME environment
variable, 2024-12-09) uses too many tilde characters, so the heading
isn't detected as such. Both AsciiDoc and Asciidoctor end up
misrendering this in different ways.

Use the correct number of tilde characters to fix this.

Signed-off-by: Martin Ågren <martin.agren@gmail.com>
---
 Documentation/git.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Documentation/git.txt b/Documentation/git.txt
index 81498393af..e89a91dd0d 100644
--- a/Documentation/git.txt
+++ b/Documentation/git.txt
@@ -478,7 +478,7 @@ their values the same way as Boolean valued configuration variables, e.g.
 Here are the variables:
 
 System
-~~~~~~~~~~~~~~~~~~
+~~~~~~
 `HOME`::
 	Specifies the path to the user's home directory. On Windows, if
 	unset, Git will set a process environment variable equal to:
-- 
2.48.0.rc1.241.g6c04ab211c


```

## Martin Ågren, 2025-01-03 11:33

Subject: [PATCH 2/2] gitcli.txt: typeset pathnames as monospace
Message-ID: <6e0abe96b60a94d4fdee15a45b7d53c2f44a0c69.1735903029.git.martin.agren@gmail.com>
URL: https://gitlist.dev/e/6e0abe96b60a94d4fdee15a45b7d53c2f44a0c69.1735903029.git.martin.agren%40gmail.com
In-Reply-To: <cover.1735903029.git.martin.agren@gmail.com>

```
Commit 1bc1e94091 (doc: option value may be separate for valid reasons,
2024-11-25) added a paragraph discussing tilde-expansion of, e.g.,
~/directory/file.

The tilde character has a special meaning to asciidoc tools. In this
particular case, AsciiDoc matches up the two tildes in "e.g.
~/directory/file or ~u/d/f" and sets the text between them using
subscript. In the manpage, where subscripting is not possible, this
renders as "e.g.  /directory/file oru/d/f".

These paths are literal values, which our coding guidelines want typeset
as verbatim using backticks. Do that. One effect of this is indeed that
the asciidoc tools stop interpreting tilde and other special characters.

Signed-off-by: Martin Ågren <martin.agren@gmail.com>
---
 Documentation/gitcli.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Documentation/gitcli.txt b/Documentation/gitcli.txt
index bd62cbd043..fcd86d2eee 100644
--- a/Documentation/gitcli.txt
+++ b/Documentation/gitcli.txt
@@ -91,7 +91,7 @@ scripting Git:
    written in the 'stuck' form.
 
  * Despite the above suggestion, when Arg is a path relative to the
-   home directory of a user, e.g. ~/directory/file or ~u/d/f, you
+   home directory of a user, e.g. `~/directory/file` or `~u/d/f`, you
    may want to use the separate form, e.g. `git foo --file ~/mine`,
    not `git foo --file=~/mine`.  The shell will expand `~/` in the
    former to your home directory, but most shells keep the tilde in
-- 
2.48.0.rc1.241.g6c04ab211c


```

## Eric Sunshine, 2025-01-03 11:39

Subject: Re: [PATCH 0/2] documentation fixes for 2.48.0
Message-ID: <CAPig+cQoFC_2M-S0d7SLBPFvusXQC93pbk3QP2+qhsa7BJGnuQ@mail.gmail.com>
URL: https://gitlist.dev/e/CAPig%2BcQoFC_2M-S0d7SLBPFvusXQC93pbk3QP2%2Bqhsa7BJGnuQ%40mail.gmail.com
In-Reply-To: <cover.1735903029.git.martin.agren@gmail.com>

```
On Fri, Jan 3, 2025 at 6:34 AM Martin Ågren <martin.agren@gmail.com> wrote:
> These two patches fix some misrenderings of the built documentation,
> introduced during the 2.48 cycle. As usual, the exact current behaviors
> (symptoms) differ a bit between AsciiDoc and Asciidoctor.

Both patches make sense. Out of curiosity, how are you discovering
these problems? Are you, for instance, running doc-diff and manually
scanning the output?

```

## Martin Ågren, 2025-01-03 11:59

Subject: Re: [PATCH 0/2] documentation fixes for 2.48.0
Message-ID: <CAN0heSqKsAoeQdhUhP1fK8V3H2Xi=UeoHGM1GH-=QdysC99qwA@mail.gmail.com>
URL: https://gitlist.dev/e/CAN0heSqKsAoeQdhUhP1fK8V3H2Xi%3DUeoHGM1GH-%3DQdysC99qwA%40mail.gmail.com
In-Reply-To: <CAPig+cQoFC_2M-S0d7SLBPFvusXQC93pbk3QP2+qhsa7BJGnuQ@mail.gmail.com>

```
On Fri, 3 Jan 2025 at 12:39, Eric Sunshine <sunshine@sunshineco.com> wrote:
>
> On Fri, Jan 3, 2025 at 6:34 AM Martin Ågren <martin.agren@gmail.com> wrote:
> > These two patches fix some misrenderings of the built documentation,
> > introduced during the 2.48 cycle. As usual, the exact current behaviors
> > (symptoms) differ a bit between AsciiDoc and Asciidoctor.
>
> Both patches make sense. Out of curiosity, how are you discovering
> these problems? Are you, for instance, running doc-diff and manually
> scanning the output?

Yes, exactly. Something like

  ./doc-diff v2.47.0 v2.48.0-rc1

is a nice way of finding out what's new. Occasionally, some oddity like
these stick out.

(The diff can easily look huge, but often several pages contain the same
content, so the 2nd/3rd/4th/... instance of a particular diff can be
skipped. Inclusion of diff-options.txt would be the typical example.)

Martin

```

## Junio C Hamano, 2025-01-03 16:21

Subject: Re: [PATCH 0/2] documentation fixes for 2.48.0
Message-ID: <xmqqjzbbswa0.fsf@gitster.g>
URL: https://gitlist.dev/e/xmqqjzbbswa0.fsf%40gitster.g
In-Reply-To: <cover.1735903029.git.martin.agren@gmail.com>

```
Martin Ågren <martin.agren@gmail.com> writes:

> These two patches fix some misrenderings of the built documentation,
> introduced during the 2.48 cycle. As usual, the exact current behaviors
> (symptoms) differ a bit between AsciiDoc and Asciidoctor.

Thanks.

```
