From: Martin Ågren <hidden> Date: 2021-02-17 19:57:22
These three patches fix some rendering issues I came across in the
output of
./doc-diff v2.30.0 master
The original topics are so/log-diff-merge, ps/config-env-pairs and
ab/mailmap.
Martin Ågren (3):
rev-list-options.txt: fix rendering of bonus paragraph
git.txt: fix monospace rendering
gitmailmap.txt: fix rendering of e-mail addresses
Documentation/git.txt | 2 +-
Documentation/gitmailmap.txt | 8 ++++----
Documentation/rev-list-options.txt | 6 +++---
3 files changed, 8 insertions(+), 8 deletions(-)
--
2.30.0.284.gd98b1dd5ea
From: Martin Ågren <hidden> Date: 2021-02-17 19:57:22
In git-log(1) -- but not in git-shortlog(1) or git-rev-list(1) -- we
include a bonus paragraph in the description of `--first-parent`. But
we forgot to add a lone "+" for a list continuation, and we shouldn't
be indenting this second paragraph. As a result, we get a different
indentation and the `backticks` render literally.
Signed-off-by: Martin Ågren <redacted>
---
doc-diff:
--- a/.../man/man1/git-log.1
+++ b/.../man/man1/git-log.1
@@ -264,8 +264,8 @@ OPTIONS
time, and this option allows you to ignore the individual commits
brought in to your history by such a merge.
- This option also changes default diff format for merge commits
- to `first-parent`, see `--diff-merges=first-parent` for details.
+ This option also changes default diff format for merge commits to
+ first-parent, see --diff-merges=first-parent for details.
--not
Reverses the meaning of the ^ prefix (or lack thereof) for all
Documentation/rev-list-options.txt | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
@@ -129,10 +129,10 @@ parents) and `--max-parents=-1` (negative numbers denote no upper limit). adjusting to updated upstream from time to time, and this option allows you to ignore the individual commits brought in to your history by such a merge.- ifdef::git-log[]- This option also changes default diff format for merge commits- to `first-parent`, see `--diff-merges=first-parent` for details.+++This option also changes default diff format for merge commits+to `first-parent`, see `--diff-merges=first-parent` for details. endif::git-log[] --not::
From: Martin Ågren <hidden> Date: 2021-02-17 19:57:22
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 <redacted>
---
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(-)
@@ -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
From: Martin Ågren <hidden> Date: 2021-02-17 19:57:22
Both AsciiDoc and Asciidoctor are eager to pick up the e-mail addresses
in this document and turn them into references at the bottom of the
manpage / clickable links. We don't really need that for these dummy
addresses. Spell "@" as "@" to make them not do this. In the open
block, we can instead avoid this by indenting the contents, similar to
the earlier blocks.
Fix a backtick which should have been a single quote mark. With all the
quoting that is going on around here, this mistake trips up the parsing
and rendering quite a bit.
Before this commit, we have the same failure mode with AsciiDoc 8.6.10
and Asciidoctor 1.5.5, and this change makes both of them happy.
Signed-off-by: Martin Ågren <redacted>
---
doc-diff:
--- a/97c686dd7ba1bbd1c0be6f7f61a3a033adf8adb6-asciidoctor-cut-footer/home/martin/share/man/man5/gitmailmap.5
+++ b/ee0422ac399daf43a7adcc2b662b50312da04631-asciidoctor-cut-footer/home/martin/share/man/man5/gitmailmap.5
@@ -40,9 +40,9 @@ SYNTAX
matching both the specified commit name and email address.
Both E-Mails and names are matched case-insensitively. For example this
- would also match the Commit Name <commit@email.xx[1]> above:
+ would also match the Commit Name [off-list ref] above:
- Proper Name <proper@email.xx[2]> CoMmIt NaMe <CoMmIt@EmAiL.xX[3]>
+ Proper Name [off-list ref] CoMmIt NaMe [off-list ref]
EXAMPLES
Your history contains commits by two authors, Jane and Joe, whose names
@@ -62,11 +62,10 @@ EXAMPLES
Jane Doe [off-list ref]
Jane Doe <jane@desktop.(none)>
- Note that there’s no need to map the name for jane@laptop.(none) to
+ Note that there’s no need to map the name for <jane@laptop.(none)> to
only correct the names. However, leaving the obviously broken
- <jane@laptop.(none)>' and '<jane@desktop.(none)>' E-Mails as-is is
- usually not what you want. A `.mailmap file which also corrects those
- is:
+ <jane@laptop.(none)> and <jane@desktop.(none)> E-Mails as-is is usually
+ not what you want. A .mailmap file which also corrects those is:
Joe R. Developer [off-list ref]
Jane Doe [off-list ref] <jane@laptop.(none)>
@@ -93,13 +92,3 @@ SEE ALSO
GIT
Part of the git(1) suite
-
-NOTES
- 1. commit@email.xx
- mailto:commit@email.xx
-
- 2. proper@email.xx
- mailto:proper@email.xx
-
- 3. CoMmIt@EmAiL.xX
- mailto:CoMmIt@EmAiL.xX
Documentation/gitmailmap.txt | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
@@ -50,9 +50,9 @@ which allows mailmap to replace both the name and the email of a commit matching both the specified commit name and email address. Both E-Mails and names are matched case-insensitively. For example-this would also match the 'Commit Name <commit@email.xx>' above:+this would also match the 'Commit Name <commit@email.xx>' above: ---Proper Name <proper@email.xx> CoMmIt NaMe <CoMmIt@EmAiL.xX>+ Proper Name <proper@email.xx> CoMmIt NaMe <CoMmIt@EmAiL.xX> -- EXAMPLES
@@ -79,9 +79,9 @@ Jane Doe <jane@example.com> Jane Doe <jane@desktop.(none)> -------------Note that there's no need to map the name for 'jane@laptop.(none)' to+Note that there's no need to map the name for '<jane@laptop.(none)>' to only correct the names. However, leaving the obviously broken-`<jane@laptop.(none)>' and '<jane@desktop.(none)>' E-Mails as-is is+'<jane@laptop.(none)>' and '<jane@desktop.(none)>' E-Mails as-is is usually not what you want. A `.mailmap` file which also corrects those is:
From: Chris Torek <hidden> Date: 2021-02-17 22:49:22
On Wed, Feb 17, 2021 at 1:21 PM Martin Ågren [off-list ref] wrote:
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.
That seems fine, but one question (diff trimmed way down to
make it clearer I hope):
+ contain an equals sign to avoid ambiguity with <name> containing
+ to avoid ambiguity with `<name>` containing one.
One replacement drops the backquotes entirely. The other keeps
them. Surely these two shouldn't be *different*...?
Chris
From: Patrick Steinhardt <hidden> Date: 2021-02-18 06:35:13
On Wed, Feb 17, 2021 at 08:56:05PM +0100, Martin Ågren wrote:
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 <redacted>
---
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.
Over here you're also dropping the backticks, while...
quoted hunk
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(-)
@@ -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.
... here you don't. Is this on purpose?
Patrick
This is useful for cases where you want to pass transitory
configuration options to git, but are doing so on OS's where
--
2.30.0.284.gd98b1dd5ea
From: Martin Ågren <hidden> Date: 2021-02-18 06:38:31
On Wed, 17 Feb 2021 at 23:47, Chris Torek [off-list ref] wrote:
On Wed, Feb 17, 2021 at 1:21 PM Martin Ågren [off-list ref] wrote:
quoted
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.
That seems fine, but one question (diff trimmed way down to
make it clearer I hope):
quoted
+ contain an equals sign to avoid ambiguity with <name> containing
quoted
+ to avoid ambiguity with `<name>` containing one.
One replacement drops the backquotes entirely. The other keeps
them. Surely these two shouldn't be *different*...?
I included the output of our "doc-diff" script below the double-dash
line. The patch applies just as fine anyway, but I did wonder if it
would trip up human readers. :-/
Quoting my original, slightly less trimmed:
On Wed, 17 Feb 2021 at 20:56, Martin Ågren [off-list ref] wrote:
doc-diff:
--- a/.../man/man1/git.1
+++ b/.../man/man1/git.1
- contain an equals sign to avoid ambiguity with `<name>`s which
- contain one.
+ contain an equals sign to avoid ambiguity with <name> containing
+ one.
So that's how the rendering is changed. From "oops, we rendered the
backticks literally" to "we no longer do". (It's not clear from the
doc-diff that they're rendered monospace/bold, but at least this is no
longer obviously broken.)
(Note the extra indentation of all of that. This is where one might
place some commentary that one don't want to burden the commit message
with, but which also isn't part of the actual diff. Now that this looks
very much like a diff, I can see how it's confusing.)
And that's because of this change to the actual sources:
quoted hunk
diff --git a/Documentation/git.txt b/Documentation/git.txtindex d36e6fd482..3a9c44987f 100644--- a/Documentation/git.txt+++ b/Documentation/git.txt
- to avoid ambiguity with `<name>`s which contain one.
+ to avoid ambiguity with `<name>` containing one.
I hope that clarifies it? It's a bit unfortunate that the misrendering
is so similar to the source in the txt file. But I guess that's still
better than some of those misrenderings where some cogwheel slips and
everything spins out of control through the rest of the paragraph.
Martin
From: Martin Ågren <hidden> Date: 2021-02-18 06:40:21
On Thu, 18 Feb 2021 at 07:27, Patrick Steinhardt [off-list ref] wrote:
On Wed, Feb 17, 2021 at 08:56:05PM +0100, Martin Ågren wrote:
quoted
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 <redacted>
---
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.
Over here you're also dropping the backticks, while...
quoted
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(-)
@@ -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.
... here you don't. Is this on purpose?
Your mail crossed with my response to Chris, who had the same question.
I'd post a link to lore.kernel.org, but it seems my response hasn't
reached it yet. The short answer is the first diff is an indented diff
of the rendered manpages (our "doc-diff" script), whereas the second
diff is the actual, to-be-applied diff.
I thought it would be helpful to include the doc-diff, but it seems it
just created more confusion than it avoided. I'll try to avoid that. :-)
Thanks
Martin
Both AsciiDoc and Asciidoctor are eager to pick up the e-mail addresses
in this document and turn them into references at the bottom of the
manpage / clickable links. We don't really need that for these dummy
addresses. Spell "@" as "@" to make them not do this. In the open
block, we can instead avoid this by indenting the contents, similar to
the earlier blocks.
Fix a backtick which should have been a single quote mark. With all the
quoting that is going on around here, this mistake trips up the parsing
and rendering quite a bit.
Before this commit, we have the same failure mode with AsciiDoc 8.6.10
and Asciidoctor 1.5.5, and this change makes both of them happy.
THanks a lot for the fix & cleaning up my mess. This LGTM.