Thread (13 messages) flat view 13 messages, 4 authors, 2016-06-16

Re: [PATCH v3 1/2] Documentation: fix linkgit references

From: Lars Schneider <hidden>
Date: 2016-06-16 02:19:08

Possibly related (same subject, not in this thread)

On 02 May 2016, at 22:34, Jeff King [off-list ref] wrote:
On Mon, May 02, 2016 at 10:20:04PM +0200, larsxschneider@gmail.com wrote:
quoted
From: Lars Schneider <redacted>

Signed-off-by: Lars Schneider <redacted>
---
Fix how? Your commit message doesn't say why this is a good idea. Since
this is v3, I'm guessing that reasoning is on the list, but it needs to
be summarized here in the commit message.
You are right, I should have explained my thinking a bit more detailed. 
A few of the fixed linkgit references are just typos, e.g.:

-linkgit:gitconfig[5]
+linkgit:git-config[5]

-values the `--date` option to linkgit::git-rev-list[1] takes).
+values the `--date` option to linkgit:git-rev-list[1] takes).

-	the Netscape/Mozilla cookie file format (see linkgit:curl[1]).
+	the Netscape/Mozilla cookie file format (see `curl(1)`).

I mistakenly assumed the "{litdd}" was a typo/bad search replace, too.
I checked this website and thought my change would fix it, too:

https://git-scm.com/docs/git-config

There it is rendered as "(See git-web{litdd}browse[1].)" and the link
is broken.

quoted hunk ↗ jump to hunk
quoted
diff --git a/Documentation/config.txt b/Documentation/config.txt
index c7bbe98..c5f1d6b 100644
--- a/Documentation/config.txt
+++ b/Documentation/config.txt
@@ -894,7 +894,7 @@ branch.<name>.description::
browser.<tool>.cmd::
	Specify the command to invoke the specified browser. The
	specified command is evaluated in shell with the URLs passed
-	as arguments. (See linkgit:git-web{litdd}browse[1].)
+	as arguments. (See linkgit:git-web--browse[1].)
The existing code renders fine for me with "make git-config.1". But with
your patch, I get a unicode emdash, which is wrong:
--- old	2016-05-02 16:27:53.242050262 -0400
+++ new	2016-05-02 16:27:57.742050360 -0400
@@ -978,7 +978,7 @@

       browser.<tool>.cmd
           Specify the command to invoke the specified browser. The specified command is evaluated in shell with the
-           URLs passed as arguments. (See git-web--browse(1).)
+           URLs passed as arguments. (See git-web—browse(1).)

       browser.<tool>.path
           Override the path for the given tool that may be used to browse HTML help (see -w option in git-help(1))
In case it's hard to see with your font, the generated roff looks like
this:

-\fBgit-web--browse\fR(1)\&.)
+\fBgit-web\(embrowse\fR(1)\&.)
I can confirm. Sorry, I indeed missed that.

So I think that's a step backwards. I did check the asciidoctor
rendering on git-scm.com, though, and it gets the {litdd} case wrong. So
I think it does need fixing, but we need a solution that looks correct
in both cases. Maybe linkgit:`git-web--browse`[1] would work; it seems
OK with my version of asciidoc, but I have a feeling it will run into
the same problem with asciidoctor (if it's not respecting {litdd} in
that context, it's probably also not respecting backticks).
I will play with this to find a solution. Would it be an option to
replace "--" with "-"? Why do we need two dashes if they cause trouble?

Thanks for the review,
Lars
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help