{"thread":{"id":"50588","subject":"[PATCH 0/3] asciidoctor-extensions: fix spurious space after linkgit","startedAt":"2019-02-25T20:03:09Z","lastAt":"2019-03-11T11:03:13Z","messageCount":31,"participants":["Martin Ågren","Eric Sunshine","brian m. carlson","Junio C Hamano","Jeff King"],"isPatch":true,"patchVersion":1,"patchTotal":3},"messages":[{"id":"370128","messageId":"cover.1551123979.git.martin.agren@gmail.com","threadId":"50588","inReplyTo":null,"subject":"[PATCH 0/3] asciidoctor-extensions: fix spurious space after linkgit","fromName":"Martin Ågren","fromEmail":"martin.agren@gmail.com","sentAt":"2019-02-25T20:02:37Z","receivedAt":"2019-02-25T20:03:09Z","isPatch":true,"sender":{"key":"martin.agren@gmail.com","avatar":null},"body":"Patch 3/3 gets rid of a spurious space which shows up immediately after\nAsciidoctor has expanded linkgit:foo[bar] if the macro is followed by\npunctuation such as a comma, period or closing parenthesis.\n\nPatch 2/3 adds a missing dependency to the makefile, so that the docs\nwill actually be rebuilt with that final patch. Patch 1/3 isn't needed\nfor this series, but could help someone in the future, similar to how\nalready having patch 2/3 would have helped me...\n\nMartin Ågren (3):\n  Documentation/Makefile: add missing xsl dependencies for manpages\n  Documentation/Makefile: add missing dependency on\n    asciidoctor-extensions\n  asciidoctor-extensions: fix spurious space after linkgit\n\n Documentation/Makefile                  | 4 ++--\n Documentation/asciidoctor-extensions.rb | 2 +-\n 2 files changed, 3 insertions(+), 3 deletions(-)\n\n-- \n2.21.0\n\n"},{"id":"370129","messageId":"e960fec4b492f3edf7bade35862333af5e8704d7.1551123979.git.martin.agren@gmail.com","threadId":"50588","inReplyTo":"cover.1551123979.git.martin.agren@gmail.com","subject":"[PATCH 1/3] Documentation/Makefile: add missing xsl dependencies for manpages","fromName":"Martin Ågren","fromEmail":"martin.agren@gmail.com","sentAt":"2019-02-25T20:02:38Z","receivedAt":"2019-02-25T20:03:12Z","isPatch":true,"sender":{"key":"martin.agren@gmail.com","avatar":null},"body":"These stylesheets very rarely change, but when they do, it really helps\nif the manpages depend on them. We're casting the net a bit too wide\nhere, since we'll only ever use a subset of the stylesheets, but since\nthese files change so rarely, that should be ok. It's better than\nmissing a dependency.\n\nSigned-off-by: Martin Ågren <martin.agren@gmail.com>\n---\n Documentation/Makefile | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/Documentation/Makefile b/Documentation/Makefile\nindex 26a2342bea..0f8054a115 100644\n--- a/Documentation/Makefile\n+++ b/Documentation/Makefile\n@@ -354,7 +354,7 @@ $(OBSOLETE_HTML): %.html : %.txto asciidoc.conf\n manpage-base-url.xsl: manpage-base-url.xsl.in\n \t$(QUIET_GEN)sed \"s|@@MAN_BASE_URL@@|$(MAN_BASE_URL)|\" $< > $@\n \n-%.1 %.5 %.7 : %.xml manpage-base-url.xsl\n+%.1 %.5 %.7 : %.xml manpage-base-url.xsl $(wildcard manpage*.xsl)\n \t$(QUIET_XMLTO)$(RM) $@ && \\\n \t$(XMLTO) -m $(MANPAGE_XSL) $(XMLTO_EXTRA) man $<\n \n-- \n2.21.0\n\n"},{"id":"370130","messageId":"966fa6a7163fcc48d1df7365461d2ac57b98bc5c.1551123979.git.martin.agren@gmail.com","threadId":"50588","inReplyTo":"cover.1551123979.git.martin.agren@gmail.com","subject":"[PATCH 2/3] Documentation/Makefile: add missing dependency on asciidoctor-extensions","fromName":"Martin Ågren","fromEmail":"martin.agren@gmail.com","sentAt":"2019-02-25T20:02:39Z","receivedAt":"2019-02-25T20:03:14Z","isPatch":true,"sender":{"key":"martin.agren@gmail.com","avatar":null},"body":"asciidoctor-extensions.rb has never changed, but when it does -- such as\nin the next commit --, it helps if the xml-files depend on it. We're\ncasting the net a bit too wide here, since we'll be rebuilding even with\nAsciiDoc, which won't look at this file. But since this file changes so\nrarely, that should be ok. It's better than missing a dependency.\n\nSigned-off-by: Martin Ågren <martin.agren@gmail.com>\n---\n Documentation/Makefile | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/Documentation/Makefile b/Documentation/Makefile\nindex 0f8054a115..a9697f5146 100644\n--- a/Documentation/Makefile\n+++ b/Documentation/Makefile\n@@ -358,7 +358,7 @@ manpage-base-url.xsl: manpage-base-url.xsl.in\n \t$(QUIET_XMLTO)$(RM) $@ && \\\n \t$(XMLTO) -m $(MANPAGE_XSL) $(XMLTO_EXTRA) man $<\n \n-%.xml : %.txt asciidoc.conf\n+%.xml : %.txt asciidoc.conf asciidoctor-extensions.rb\n \t$(QUIET_ASCIIDOC)$(RM) $@+ $@ && \\\n \t$(TXT_TO_XML) -d manpage -o $@+ $< && \\\n \tmv $@+ $@\n-- \n2.21.0\n\n"},{"id":"370131","messageId":"41d9ea21c37a634b2310b5b2f68935bcd612665c.1551123979.git.martin.agren@gmail.com","threadId":"50588","inReplyTo":"cover.1551123979.git.martin.agren@gmail.com","subject":"[PATCH 3/3] asciidoctor-extensions: fix spurious space after linkgit","fromName":"Martin Ågren","fromEmail":"martin.agren@gmail.com","sentAt":"2019-02-25T20:02:40Z","receivedAt":"2019-02-25T20:03:17Z","isPatch":true,"sender":{"key":"martin.agren@gmail.com","avatar":null},"body":"When we render, e.g., \"linkgit:gitglossary[7].\" with Asciidoctor, we get\n\"gitglossary(7) .\" with a space between the linkgit macro expansion and\nthe punctuation. We can fix this by dropping the trailing newline after\nwe've turned `linkgit:foo[bar]` into `<citerefentry>..</citerefentry>`.\n\nThe diff produced by `USE_ASCIIDOCTOR=Yes ./doc-diff HEAD^ HEAD` is\nalmost 6000 lines large and shows how this fixes \"git-foo(x) ,\", \"(see\ngit-bar(y) )\" and so on. One might wonder whether this also turns, e.g.,\n\"see linkgit:foo[1] for more\" into \"see foo(1)for more\", but no. We get\n\"...</citerefentry> for more\" in the XML, see, e.g., git-am.xml, so the\nspace ends up in git-am.1 just fine.\n\nSigned-off-by: Martin Ågren <martin.agren@gmail.com>\n---\n Documentation/asciidoctor-extensions.rb | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/Documentation/asciidoctor-extensions.rb b/Documentation/asciidoctor-extensions.rb\nindex ec83b4959e..f7a5982f8b 100644\n--- a/Documentation/asciidoctor-extensions.rb\n+++ b/Documentation/asciidoctor-extensions.rb\n@@ -16,7 +16,7 @@ module Git\n           \"<citerefentry>\\n\" \\\n             \"<refentrytitle>#{target}</refentrytitle>\" \\\n             \"<manvolnum>#{attrs[1]}</manvolnum>\\n\" \\\n-          \"</citerefentry>\\n\"\n+          \"</citerefentry>\"\n         end\n       end\n     end\n-- \n2.21.0\n\n"},{"id":"370132","messageId":"CAPig+cS7BdHhLn+XjjyVa+PC040y-E4iPD=kuDtigenzSHcFKQ@mail.gmail.com","threadId":"50588","inReplyTo":"e960fec4b492f3edf7bade35862333af5e8704d7.1551123979.git.martin.agren@gmail.com","subject":"Re: [PATCH 1/3] Documentation/Makefile: add missing xsl dependencies for manpages","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2019-02-25T20:08:05Z","receivedAt":"2019-02-25T20:08:19Z","isPatch":true,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"On Mon, Feb 25, 2019 at 3:03 PM Martin Ågren <martin.agren@gmail.com> wrote:\n> These stylesheets very rarely change, but when they do, it really helps\n> if the manpages depend on them. We're casting the net a bit too wide\n> here, since we'll only ever use a subset of the stylesheets, but since\n> these files change so rarely, that should be ok. It's better than\n> missing a dependency.\n>\n> Signed-off-by: Martin Ågren <martin.agren@gmail.com>\n> ---\n> diff --git a/Documentation/Makefile b/Documentation/Makefile\n> @@ -354,7 +354,7 @@ $(OBSOLETE_HTML): %.html : %.txto asciidoc.conf\n> -%.1 %.5 %.7 : %.xml manpage-base-url.xsl\n> +%.1 %.5 %.7 : %.xml manpage-base-url.xsl $(wildcard manpage*.xsl)\n\nThe wildcard expression also matches the manpage-base-url.xsl\nmentioned explicitly. Did you intentionally retain the explicit one or\nwas that an oversight?\n"},{"id":"370136","messageId":"CAN0heSrogSpdSOGj0ibx0Dcjw=0o0u0VSivfjgL7r5f-Jiqs3w@mail.gmail.com","threadId":"50588","inReplyTo":"CAPig+cS7BdHhLn+XjjyVa+PC040y-E4iPD=kuDtigenzSHcFKQ@mail.gmail.com","subject":"Re: [PATCH 1/3] Documentation/Makefile: add missing xsl dependencies for manpages","fromName":"Martin Ågren","fromEmail":"martin.agren@gmail.com","sentAt":"2019-02-25T20:28:52Z","receivedAt":"2019-02-25T20:29:06Z","isPatch":true,"sender":{"key":"martin.agren@gmail.com","avatar":null},"body":"On Mon, 25 Feb 2019 at 21:08, Eric Sunshine <sunshine@sunshineco.com> wrote:\n>\n> On Mon, Feb 25, 2019 at 3:03 PM Martin Ågren <martin.agren@gmail.com> wrote:\n> > These stylesheets very rarely change, but when they do, it really helps\n> > if the manpages depend on them. We're casting the net a bit too wide\n> > here, since we'll only ever use a subset of the stylesheets, but since\n> > these files change so rarely, that should be ok. It's better than\n> > missing a dependency.\n> >\n> > Signed-off-by: Martin Ågren <martin.agren@gmail.com>\n> > ---\n> > diff --git a/Documentation/Makefile b/Documentation/Makefile\n> > @@ -354,7 +354,7 @@ $(OBSOLETE_HTML): %.html : %.txto asciidoc.conf\n> > -%.1 %.5 %.7 : %.xml manpage-base-url.xsl\n> > +%.1 %.5 %.7 : %.xml manpage-base-url.xsl $(wildcard manpage*.xsl)\n>\n> The wildcard expression also matches the manpage-base-url.xsl\n> mentioned explicitly. Did you intentionally retain the explicit one or\n> was that an oversight?\n\nHmm, I should have mentioned that, thanks for asking for clarification.\n\nIt's intentional. You can see in the context how manpage-base-url.xsl is\nactually generated, so the wildcard won't be able to expand to mention\nit. That's subtle enough that it warrants being mentioned upfront.\n\n\nMartin\n"},{"id":"370140","messageId":"CAPig+cRTj_jHFrqyYsn=ivuO9uNcWjB=5okX0SCGoeWU=uR8Gw@mail.gmail.com","threadId":"50588","inReplyTo":"CAN0heSrogSpdSOGj0ibx0Dcjw=0o0u0VSivfjgL7r5f-Jiqs3w@mail.gmail.com","subject":"Re: [PATCH 1/3] Documentation/Makefile: add missing xsl dependencies for manpages","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2019-02-25T21:00:50Z","receivedAt":"2019-02-25T21:01:05Z","isPatch":true,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"On Mon, Feb 25, 2019 at 3:29 PM Martin Ågren <martin.agren@gmail.com> wrote:\n> On Mon, 25 Feb 2019 at 21:08, Eric Sunshine <sunshine@sunshineco.com> wrote:\n> > On Mon, Feb 25, 2019 at 3:03 PM Martin Ågren <martin.agren@gmail.com> wrote:\n> > > -%.1 %.5 %.7 : %.xml manpage-base-url.xsl\n> > > +%.1 %.5 %.7 : %.xml manpage-base-url.xsl $(wildcard manpage*.xsl)\n> >\n> > The wildcard expression also matches the manpage-base-url.xsl\n> > mentioned explicitly. Did you intentionally retain the explicit one or\n> > was that an oversight?\n>\n> Hmm, I should have mentioned that, thanks for asking for clarification.\n>\n> It's intentional. You can see in the context how manpage-base-url.xsl is\n> actually generated, so the wildcard won't be able to expand to mention\n> it. That's subtle enough that it warrants being mentioned upfront.\n\nI guess I was further confused by the fact that manpage-base-url.xsl\nis still present even after \"make distclean\", which is not something I\nwould have expected for a generated file. (Perhaps something to\nconsider \"fixing\" if you re-roll, or not if it's out of scope.)\n"},{"id":"370198","messageId":"20190226032000.GC601925@genre.crustytoothpaste.net","threadId":"50588","inReplyTo":"41d9ea21c37a634b2310b5b2f68935bcd612665c.1551123979.git.martin.agren@gmail.com","subject":"Re: [PATCH 3/3] asciidoctor-extensions: fix spurious space after linkgit","fromName":"brian m. carlson","fromEmail":"sandals@crustytoothpaste.net","sentAt":"2019-02-26T03:20:00Z","receivedAt":"2019-02-26T03:20:12Z","isPatch":true,"sender":{"key":"sandals@crustytoothpaste.net","avatar":"https://avatars.githubusercontent.com/u/497054?v=4"},"body":"On Mon, Feb 25, 2019 at 09:02:40PM +0100, Martin Ågren wrote:\n> When we render, e.g., \"linkgit:gitglossary[7].\" with Asciidoctor, we get\n> \"gitglossary(7) .\" with a space between the linkgit macro expansion and\n> the punctuation. We can fix this by dropping the trailing newline after\n> we've turned `linkgit:foo[bar]` into `<citerefentry>..</citerefentry>`.\n> \n> The diff produced by `USE_ASCIIDOCTOR=Yes ./doc-diff HEAD^ HEAD` is\n> almost 6000 lines large and shows how this fixes \"git-foo(x) ,\", \"(see\n> git-bar(y) )\" and so on. One might wonder whether this also turns, e.g.,\n> \"see linkgit:foo[1] for more\" into \"see foo(1)for more\", but no. We get\n> \"...</citerefentry> for more\" in the XML, see, e.g., git-am.xml, so the\n> space ends up in git-am.1 just fine.\n> \n> Signed-off-by: Martin Ågren <martin.agren@gmail.com>\n> ---\n>  Documentation/asciidoctor-extensions.rb | 2 +-\n>  1 file changed, 1 insertion(+), 1 deletion(-)\n> \n> diff --git a/Documentation/asciidoctor-extensions.rb b/Documentation/asciidoctor-extensions.rb\n> index ec83b4959e..f7a5982f8b 100644\n> --- a/Documentation/asciidoctor-extensions.rb\n> +++ b/Documentation/asciidoctor-extensions.rb\n> @@ -16,7 +16,7 @@ module Git\n>            \"<citerefentry>\\n\" \\\n>              \"<refentrytitle>#{target}</refentrytitle>\" \\\n>              \"<manvolnum>#{attrs[1]}</manvolnum>\\n\" \\\n> -          \"</citerefentry>\\n\"\n> +          \"</citerefentry>\"\n>          end\n>        end\n>      end\n\nYeah, I think this is clearly correct. I also like that you mentioned\nthe concern about potentially not including the space, which might not\nbe obvious to someone not intimately familiar with DocBook and the\nstylesheets.\n-- \nbrian m. carlson: Houston, Texas, US\nOpenPGP: https://keybase.io/bk2204\n"},{"id":"370199","messageId":"20190226032201.GD601925@genre.crustytoothpaste.net","threadId":"50588","inReplyTo":"cover.1551123979.git.martin.agren@gmail.com","subject":"Re: [PATCH 0/3] asciidoctor-extensions: fix spurious space after linkgit","fromName":"brian m. carlson","fromEmail":"sandals@crustytoothpaste.net","sentAt":"2019-02-26T03:22:01Z","receivedAt":"2019-02-26T03:22:09Z","isPatch":true,"sender":{"key":"sandals@crustytoothpaste.net","avatar":"https://avatars.githubusercontent.com/u/497054?v=4"},"body":"On Mon, Feb 25, 2019 at 09:02:37PM +0100, Martin Ågren wrote:\n> Patch 3/3 gets rid of a spurious space which shows up immediately after\n> Asciidoctor has expanded linkgit:foo[bar] if the macro is followed by\n> punctuation such as a comma, period or closing parenthesis.\n> \n> Patch 2/3 adds a missing dependency to the makefile, so that the docs\n> will actually be rebuilt with that final patch. Patch 1/3 isn't needed\n> for this series, but could help someone in the future, similar to how\n> already having patch 2/3 would have helped me...\n> \n> Martin Ågren (3):\n>   Documentation/Makefile: add missing xsl dependencies for manpages\n>   Documentation/Makefile: add missing dependency on\n>     asciidoctor-extensions\n>   asciidoctor-extensions: fix spurious space after linkgit\n> \n>  Documentation/Makefile                  | 4 ++--\n>  Documentation/asciidoctor-extensions.rb | 2 +-\n>  2 files changed, 3 insertions(+), 3 deletions(-)\n\nThanks for putting this series together. I would suggest an update to\nthe commit message in 1/3 explaining the edge case that Eric Sunshine\nmentioned, but otherwise, I think this looks good.\n-- \nbrian m. carlson: Houston, Texas, US\nOpenPGP: https://keybase.io/bk2204\n"},{"id":"370207","messageId":"CAN0heSoWv9xTYzFS16-fjnZuY_+6vpHSHcLmwWG8DdJEmNcTuA@mail.gmail.com","threadId":"50588","inReplyTo":"CAPig+cRTj_jHFrqyYsn=ivuO9uNcWjB=5okX0SCGoeWU=uR8Gw@mail.gmail.com","subject":"Re: [PATCH 1/3] Documentation/Makefile: add missing xsl dependencies for manpages","fromName":"Martin Ågren","fromEmail":"martin.agren@gmail.com","sentAt":"2019-02-26T05:59:33Z","receivedAt":"2019-02-26T05:59:47Z","isPatch":true,"sender":{"key":"martin.agren@gmail.com","avatar":null},"body":"On Mon, 25 Feb 2019 at 22:01, Eric Sunshine <sunshine@sunshineco.com> wrote:\n>\n> On Mon, Feb 25, 2019 at 3:29 PM Martin Ågren <martin.agren@gmail.com> wrote:\n> > On Mon, 25 Feb 2019 at 21:08, Eric Sunshine <sunshine@sunshineco.com> wrote:\n> > >\n> > > The wildcard expression also matches the manpage-base-url.xsl\n> > > mentioned explicitly. Did you intentionally retain the explicit one or\n> > > was that an oversight?\n> >\n> > Hmm, I should have mentioned that, thanks for asking for clarification.\n> >\n> > It's intentional.\n\n> I guess I was further confused by the fact that manpage-base-url.xsl\n> is still present even after \"make distclean\", which is not something I\n> would have expected for a generated file. (Perhaps something to\n> consider \"fixing\" if you re-roll, or not if it's out of scope.)\n\nAre you sure? `make distclean` in the top directory depends on the\n\"clean\" target, which calls out to `make -C Documentation/ clean`, which\nremoves the file. A test-run works here:\n\nBefore:\n\n$ ls | grep manpage-base\nmanpage-base-url.xsl\nmanpage-base-url.xsl.in\nmanpage-base.xsl\n\nAfter:\n\n$ ls | grep manpage-base\nmanpage-base-url.xsl.in\nmanpage-base.xsl\n\nWere you perhaps mislead by one of the similarly-named files?\n\nMartin\n"},{"id":"370208","messageId":"CAN0heSqLbn7dRu4eARpyMqhFYpj3Pr5i=EMPnQZK9hUfWmf-KQ@mail.gmail.com","threadId":"50588","inReplyTo":"20190226032201.GD601925@genre.crustytoothpaste.net","subject":"Re: [PATCH 0/3] asciidoctor-extensions: fix spurious space after linkgit","fromName":"Martin Ågren","fromEmail":"martin.agren@gmail.com","sentAt":"2019-02-26T06:03:21Z","receivedAt":"2019-02-26T06:03:34Z","isPatch":true,"sender":{"key":"martin.agren@gmail.com","avatar":null},"body":"On Tue, 26 Feb 2019 at 04:22, brian m. carlson\n<sandals@crustytoothpaste.net> wrote:\n>\n> Thanks for putting this series together. I would suggest an update to\n> the commit message in 1/3 explaining the edge case that Eric Sunshine\n> mentioned, but otherwise, I think this looks good.\n\nThank you. I'll do that, after waiting for a while for any other\ncomments, and to see what conclusion I and Eric can reach on the\n`make distclean` tangent.\n\nMartin\n"},{"id":"370234","messageId":"CAPig+cQ8d7_=sY5bQ8soeNAnE60o8mdE4utCiJSaJgR7p8UrwA@mail.gmail.com","threadId":"50588","inReplyTo":"CAN0heSoWv9xTYzFS16-fjnZuY_+6vpHSHcLmwWG8DdJEmNcTuA@mail.gmail.com","subject":"Re: [PATCH 1/3] Documentation/Makefile: add missing xsl dependencies for manpages","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2019-02-26T12:47:41Z","receivedAt":"2019-02-26T12:47:55Z","isPatch":true,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"On Tue, Feb 26, 2019 at 12:59 AM Martin Ågren <martin.agren@gmail.com> wrote:\n> On Mon, 25 Feb 2019 at 22:01, Eric Sunshine <sunshine@sunshineco.com> wrote:\n> > I guess I was further confused by the fact that manpage-base-url.xsl\n> > is still present even after \"make distclean\", which is not something I\n> > would have expected for a generated file. (Perhaps something to\n> > consider \"fixing\" if you re-roll, or not if it's out of scope.)\n>\n> Are you sure? `make distclean` in the top directory depends on the\n> \"clean\" target, which calls out to `make -C Documentation/ clean`, which\n> removes the file. [...]\n> Were you perhaps mislead by one of the similarly-named files?\n\nYes, I was misled by similar names. Sorry for the noise.\n"},{"id":"370334","messageId":"cover.1551290936.git.martin.agren@gmail.com","threadId":"50588","inReplyTo":"CAN0heSqLbn7dRu4eARpyMqhFYpj3Pr5i=EMPnQZK9hUfWmf-KQ@mail.gmail.com","subject":"[PATCH v2 0/3] asciidoctor-extensions: fix spurious space after linkgit","fromName":"Martin Ågren","fromEmail":"martin.agren@gmail.com","sentAt":"2019-02-27T18:17:51Z","receivedAt":"2019-02-27T18:18:16Z","isPatch":true,"sender":{"key":"martin.agren@gmail.com","avatar":null},"body":"Just like v1 [1], this v2 removes a spurious space which shows up in a\nlarge number of places in our manpages when Asciidoctor expands the\nlinkgit:foo[bar] macro. The only difference is a new paragraph in the\ncommit message of the first patch to explain why we need to explicitly\nlist a file we depend on.\n\nThanks Eric and brian for your comments on v1.\n\n[1] https://public-inbox.org/git/cover.1551123979.git.martin.agren@gmail.com/\n\nMartin Ågren (3):\n  Documentation/Makefile: add missing xsl dependencies for manpages\n  Documentation/Makefile: add missing dependency on\n    asciidoctor-extensions\n  asciidoctor-extensions: fix spurious space after linkgit\n\n Documentation/Makefile                  | 4 ++--\n Documentation/asciidoctor-extensions.rb | 2 +-\n 2 files changed, 3 insertions(+), 3 deletions(-)\n\n-- \n2.21.0\n\n"},{"id":"370336","messageId":"6f08eb292e9b6774c21c0d9276506f055596703a.1551290936.git.martin.agren@gmail.com","threadId":"50588","inReplyTo":"cover.1551290936.git.martin.agren@gmail.com","subject":"[PATCH v2 1/3] Documentation/Makefile: add missing xsl dependencies for manpages","fromName":"Martin Ågren","fromEmail":"martin.agren@gmail.com","sentAt":"2019-02-27T18:17:52Z","receivedAt":"2019-02-27T18:18:20Z","isPatch":true,"sender":{"key":"martin.agren@gmail.com","avatar":null},"body":"These stylesheets very rarely change, but when they do, it really helps\nif the manpages depend on them. We're casting the net a bit too wide\nhere, since we'll only ever use a subset of the stylesheets, but since\nthese files change so rarely, that should be ok. It's better than\nmissing a dependency.\n\nObserve that manpage-base-url.xsl is a generated file, so we need to\nlist it explicitly, besides the `wildcard` expression we're adding here.\n\nSigned-off-by: Martin Ågren <martin.agren@gmail.com>\n---\n Documentation/Makefile | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/Documentation/Makefile b/Documentation/Makefile\nindex 26a2342bea..0f8054a115 100644\n--- a/Documentation/Makefile\n+++ b/Documentation/Makefile\n@@ -354,7 +354,7 @@ $(OBSOLETE_HTML): %.html : %.txto asciidoc.conf\n manpage-base-url.xsl: manpage-base-url.xsl.in\n \t$(QUIET_GEN)sed \"s|@@MAN_BASE_URL@@|$(MAN_BASE_URL)|\" $< > $@\n \n-%.1 %.5 %.7 : %.xml manpage-base-url.xsl\n+%.1 %.5 %.7 : %.xml manpage-base-url.xsl $(wildcard manpage*.xsl)\n \t$(QUIET_XMLTO)$(RM) $@ && \\\n \t$(XMLTO) -m $(MANPAGE_XSL) $(XMLTO_EXTRA) man $<\n \n-- \n2.21.0\n\n"},{"id":"370337","messageId":"9e206ac0e870807d5baaba4e75fe22124b3922dd.1551290936.git.martin.agren@gmail.com","threadId":"50588","inReplyTo":"cover.1551290936.git.martin.agren@gmail.com","subject":"[PATCH v2 2/3] Documentation/Makefile: add missing dependency on asciidoctor-extensions","fromName":"Martin Ågren","fromEmail":"martin.agren@gmail.com","sentAt":"2019-02-27T18:17:53Z","receivedAt":"2019-02-27T18:18:22Z","isPatch":true,"sender":{"key":"martin.agren@gmail.com","avatar":null},"body":"asciidoctor-extensions.rb has never changed, but when it does -- such as\nin the next commit --, it helps if the xml-files depend on it. We're\ncasting the net a bit too wide here, since we'll be rebuilding even with\nAsciiDoc, which won't look at this file. But since this file changes so\nrarely, that should be ok. It's better than missing a dependency.\n\nSigned-off-by: Martin Ågren <martin.agren@gmail.com>\n---\n Documentation/Makefile | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/Documentation/Makefile b/Documentation/Makefile\nindex 0f8054a115..a9697f5146 100644\n--- a/Documentation/Makefile\n+++ b/Documentation/Makefile\n@@ -358,7 +358,7 @@ manpage-base-url.xsl: manpage-base-url.xsl.in\n \t$(QUIET_XMLTO)$(RM) $@ && \\\n \t$(XMLTO) -m $(MANPAGE_XSL) $(XMLTO_EXTRA) man $<\n \n-%.xml : %.txt asciidoc.conf\n+%.xml : %.txt asciidoc.conf asciidoctor-extensions.rb\n \t$(QUIET_ASCIIDOC)$(RM) $@+ $@ && \\\n \t$(TXT_TO_XML) -d manpage -o $@+ $< && \\\n \tmv $@+ $@\n-- \n2.21.0\n\n"},{"id":"370338","messageId":"e1021ad4a97a78e7428fcdfbf2af7196a0c8d340.1551290936.git.martin.agren@gmail.com","threadId":"50588","inReplyTo":"cover.1551290936.git.martin.agren@gmail.com","subject":"[PATCH v2 3/3] asciidoctor-extensions: fix spurious space after linkgit","fromName":"Martin Ågren","fromEmail":"martin.agren@gmail.com","sentAt":"2019-02-27T18:17:54Z","receivedAt":"2019-02-27T18:18:26Z","isPatch":true,"sender":{"key":"martin.agren@gmail.com","avatar":null},"body":"When we render, e.g., \"linkgit:gitglossary[7].\" with Asciidoctor, we get\n\"gitglossary(7) .\" with a space between the linkgit macro expansion and\nthe punctuation. We can fix this by dropping the trailing newline after\nwe've turned `linkgit:foo[bar]` into `<citerefentry>..</citerefentry>`.\n\nThe diff produced by `USE_ASCIIDOCTOR=Yes ./doc-diff HEAD^ HEAD` is\nalmost 6000 lines large and shows how this fixes \"git-foo(x) ,\", \"(see\ngit-bar(y) )\" and so on. One might wonder whether this also turns, e.g.,\n\"see linkgit:foo[1] for more\" into \"see foo(1)for more\", but no. We get\n\"...</citerefentry> for more\" in the XML, see, e.g., git-am.xml, so the\nspace ends up in git-am.1 just fine.\n\nSigned-off-by: Martin Ågren <martin.agren@gmail.com>\n---\n Documentation/asciidoctor-extensions.rb | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/Documentation/asciidoctor-extensions.rb b/Documentation/asciidoctor-extensions.rb\nindex ec83b4959e..f7a5982f8b 100644\n--- a/Documentation/asciidoctor-extensions.rb\n+++ b/Documentation/asciidoctor-extensions.rb\n@@ -16,7 +16,7 @@ module Git\n           \"<citerefentry>\\n\" \\\n             \"<refentrytitle>#{target}</refentrytitle>\" \\\n             \"<manvolnum>#{attrs[1]}</manvolnum>\\n\" \\\n-          \"</citerefentry>\\n\"\n+          \"</citerefentry>\"\n         end\n       end\n     end\n-- \n2.21.0\n\n"},{"id":"370339","messageId":"CAN0heSqADqqk1SaPMeQnQR3c3sabn=vD2NmfH5VinyKXk8ezkw@mail.gmail.com","threadId":"50588","inReplyTo":"CAPig+cQ8d7_=sY5bQ8soeNAnE60o8mdE4utCiJSaJgR7p8UrwA@mail.gmail.com","subject":"Re: [PATCH 1/3] Documentation/Makefile: add missing xsl dependencies for manpages","fromName":"Martin Ågren","fromEmail":"martin.agren@gmail.com","sentAt":"2019-02-27T18:19:00Z","receivedAt":"2019-02-27T18:19:14Z","isPatch":true,"sender":{"key":"martin.agren@gmail.com","avatar":null},"body":"On Tue, 26 Feb 2019 at 13:47, Eric Sunshine <sunshine@sunshineco.com> wrote:\n>\n> On Tue, Feb 26, 2019 at 12:59 AM Martin Ågren <martin.agren@gmail.com> wrote:\n> > Were you perhaps mislead by one of the similarly-named files?\n>\n> Yes, I was misled by similar names. Sorry for the noise.\n\nHey, no problem. And thanks for the subtle hint about \"misled\". ;-)\nI appreciate it.\n\nMartin\n"},{"id":"370397","messageId":"20190228235018.GE601925@genre.crustytoothpaste.net","threadId":"50588","inReplyTo":"cover.1551290936.git.martin.agren@gmail.com","subject":"Re: [PATCH v2 0/3] asciidoctor-extensions: fix spurious space after linkgit","fromName":"brian m. carlson","fromEmail":"sandals@crustytoothpaste.net","sentAt":"2019-02-28T23:50:18Z","receivedAt":"2019-02-28T23:50:28Z","isPatch":true,"sender":{"key":"sandals@crustytoothpaste.net","avatar":"https://avatars.githubusercontent.com/u/497054?v=4"},"body":"On Wed, Feb 27, 2019 at 07:17:51PM +0100, Martin Ågren wrote:\n> Just like v1 [1], this v2 removes a spurious space which shows up in a\n> large number of places in our manpages when Asciidoctor expands the\n> linkgit:foo[bar] macro. The only difference is a new paragraph in the\n> commit message of the first patch to explain why we need to explicitly\n> list a file we depend on.\n> \n> Thanks Eric and brian for your comments on v1.\n> \n> [1] https://public-inbox.org/git/cover.1551123979.git.martin.agren@gmail.com/\n> \n> Martin Ågren (3):\n>   Documentation/Makefile: add missing xsl dependencies for manpages\n>   Documentation/Makefile: add missing dependency on\n>     asciidoctor-extensions\n>   asciidoctor-extensions: fix spurious space after linkgit\n> \n>  Documentation/Makefile                  | 4 ++--\n>  Documentation/asciidoctor-extensions.rb | 2 +-\n>  2 files changed, 3 insertions(+), 3 deletions(-)\n\nThis version looks good to me. Thanks again for getting this cleaned up.\n-- \nbrian m. carlson: Houston, Texas, US\nOpenPGP: https://keybase.io/bk2204\n"},{"id":"370494","messageId":"xmqqmumc3g1h.fsf@gitster-ct.c.googlers.com","threadId":"50588","inReplyTo":"20190228235018.GE601925@genre.crustytoothpaste.net","subject":"Re: [PATCH v2 0/3] asciidoctor-extensions: fix spurious space after linkgit","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2019-03-03T01:25:30Z","receivedAt":"2019-03-03T01:25:34Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"brian m. carlson\" <sandals@crustytoothpaste.net> writes:\n\n> On Wed, Feb 27, 2019 at 07:17:51PM +0100, Martin Ågren wrote:\n>> Just like v1 [1], this v2 removes a spurious space which shows up in a\n>> large number of places in our manpages when Asciidoctor expands the\n>> linkgit:foo[bar] macro. The only difference is a new paragraph in the\n>> commit message of the first patch to explain why we need to explicitly\n>> list a file we depend on.\n>> \n>> Thanks Eric and brian for your comments on v1.\n>> \n>> [1] https://public-inbox.org/git/cover.1551123979.git.martin.agren@gmail.com/\n>> \n>> Martin Ågren (3):\n>>   Documentation/Makefile: add missing xsl dependencies for manpages\n>>   Documentation/Makefile: add missing dependency on\n>>     asciidoctor-extensions\n>>   asciidoctor-extensions: fix spurious space after linkgit\n>> \n>>  Documentation/Makefile                  | 4 ++--\n>>  Documentation/asciidoctor-extensions.rb | 2 +-\n>>  2 files changed, 3 insertions(+), 3 deletions(-)\n>\n> This version looks good to me. Thanks again for getting this cleaned up.\n\nThanks, all.  Will queue.\n"},{"id":"371077","messageId":"cover.1552230490.git.martin.agren@gmail.com","threadId":"50588","inReplyTo":"xmqqmumc3g1h.fsf@gitster-ct.c.googlers.com","subject":"[PATCH 0/2] fix spurious space after linkgit, now in *.html","fromName":"Martin Ågren","fromEmail":"martin.agren@gmail.com","sentAt":"2019-03-10T15:14:22Z","receivedAt":"2019-03-10T15:14:56Z","isPatch":true,"sender":{"key":"martin.agren@gmail.com","avatar":null},"body":"On Sun, 3 Mar 2019 at 02:25, Junio C Hamano <gitster@pobox.com> wrote:\n>\n> \"brian m. carlson\" <sandals@crustytoothpaste.net> writes:\n>\n> > On Wed, Feb 27, 2019 at 07:17:51PM +0100, Martin Ågren wrote:\n> >> Just like v1 [1], this v2 removes a spurious space which shows up in a\n> >> large number of places in our manpages when Asciidoctor expands the\n> >> linkgit:foo[bar] macro. [...]\n> >\n> > This version looks good to me. Thanks again for getting this cleaned up.\n>\n> Thanks, all.  Will queue.\n\nBleh. For some reason [1] I thought the html-files were exempt from this\n\"extra space after linkgit\" problem. They're not, as I just noticed. To\nadd insult to injury, my original patch 2 which adds a missing\ndependency to the xml targets fails to add the exact same dependency for\na few other targets. So of the three patches discussed above, at least\ntwo were incomplete.\n\nSince this has hit \"next\", here are two patches on top to address this.\n\nSorry about this.\n\nMartin\n\n[1] I could have sworn I checked the html docs and saw that they didn't\nhave this extra space. Looking at git-scm.com again reveals that it's\nnot there. Huh. Seems like the site's html-rendering doesn't go through our\nMakefile at all and handles \"linkgit:\" on its own:\nhttps://github.com/git/git-scm.com/blob/master/script/doc_importer\n\nMartin Ågren (2):\n  Documentation/Makefile: add missing dependencies on\n    asciidoctor-extensions\n  asciidoctor-extensions: fix spurious space after linkgit in *.html\n\n Documentation/Makefile                  | 6 +++---\n Documentation/asciidoctor-extensions.rb | 2 +-\n 2 files changed, 4 insertions(+), 4 deletions(-)\n\n-- \n2.21.0\n\n"},{"id":"371078","messageId":"7ec45f69fabee22f2a9b4e08c5ba7d88b32814be.1552230490.git.martin.agren@gmail.com","threadId":"50588","inReplyTo":"cover.1552230490.git.martin.agren@gmail.com","subject":"[PATCH 1/2] Documentation/Makefile: add missing dependencies on asciidoctor-extensions","fromName":"Martin Ågren","fromEmail":"martin.agren@gmail.com","sentAt":"2019-03-10T15:14:23Z","receivedAt":"2019-03-10T15:15:00Z","isPatch":true,"sender":{"key":"martin.agren@gmail.com","avatar":null},"body":"I really should have caught this when I wrote 00c87bceaa\n(\"Documentation/Makefile: add missing dependency on\nasciidoctor-extensions\", 2019-02-27). That commit made sure that the\nxml-files depend on our Asciidoctor-specific extensions, but that just\nhelps for the \".txt -> .xml -> .[157]\" transformations.\n\nBecause we produce the html-files directly as \".txt -> .html\" -- not as\n\".txt -> .xml -> .html\" --, we need to make the html-files too depend on\nasciidoctor-extensions.rb.\n\nThere's one exception to the above paragraph. We do render\nuser-manual.html by going through an intermediate user-manual.xml, which\nis an explicit, special-cased target. Add the missing dependency to\nuser-manual.xml.\n\nSigned-off-by: Martin Ågren <martin.agren@gmail.com>\n---\n Documentation/Makefile | 6 +++---\n 1 file changed, 3 insertions(+), 3 deletions(-)\n\ndiff --git a/Documentation/Makefile b/Documentation/Makefile\nindex f63c775e88..f58904a929 100644\n--- a/Documentation/Makefile\n+++ b/Documentation/Makefile\n@@ -334,12 +334,12 @@ clean:\n \t$(RM) $(cmds_txt) $(mergetools_txt) *.made\n \t$(RM) manpage-base-url.xsl\n \n-$(MAN_HTML): %.html : %.txt asciidoc.conf\n+$(MAN_HTML): %.html : %.txt asciidoc.conf asciidoctor-extensions.rb\n \t$(QUIET_ASCIIDOC)$(RM) $@+ $@ && \\\n \t$(TXT_TO_HTML) -d manpage -o $@+ $< && \\\n \tmv $@+ $@\n \n-$(OBSOLETE_HTML): %.html : %.txto asciidoc.conf\n+$(OBSOLETE_HTML): %.html : %.txto asciidoc.conf asciidoctor-extensions.rb\n \t$(QUIET_ASCIIDOC)$(RM) $@+ $@ && \\\n \t$(TXT_TO_HTML) -o $@+ $< && \\\n \tmv $@+ $@\n@@ -356,7 +356,7 @@ manpage-base-url.xsl: manpage-base-url.xsl.in\n \t$(TXT_TO_XML) -d manpage -o $@+ $< && \\\n \tmv $@+ $@\n \n-user-manual.xml: user-manual.txt user-manual.conf\n+user-manual.xml: user-manual.txt user-manual.conf asciidoctor-extensions.rb\n \t$(QUIET_ASCIIDOC)$(RM) $@+ $@ && \\\n \t$(TXT_TO_XML) -d book -o $@+ $< && \\\n \tmv $@+ $@\n-- \n2.21.0\n\n"},{"id":"371079","messageId":"bd8e8706fd30db7200c32570acf4aa3e5ca3fbbf.1552230490.git.martin.agren@gmail.com","threadId":"50588","inReplyTo":"cover.1552230490.git.martin.agren@gmail.com","subject":"[PATCH 2/2] asciidoctor-extensions: fix spurious space after linkgit in *.html","fromName":"Martin Ågren","fromEmail":"martin.agren@gmail.com","sentAt":"2019-03-10T15:14:24Z","receivedAt":"2019-03-10T15:15:03Z","isPatch":true,"sender":{"key":"martin.agren@gmail.com","avatar":null},"body":"I really should have caught this when I wrote c3b4efa030\n(\"asciidoctor-extensions: fix spurious space after linkgit\",\n2019-02-27). Turns out that when we create html-files, we take a\ndifferent path through this macro. So similar to c3b4efa030, we need to\ndrop a \"\\n\" which turns into a space before punctuation.\n\nJust like with c3b4efa030, note that if what follows is a word, not\npunctuation, the white space renders just fine. So constructions such as\n\"see linkgit:foo[1] for more\" still render as intended.\n\nSigned-off-by: Martin Ågren <martin.agren@gmail.com>\n---\n Documentation/asciidoctor-extensions.rb | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/Documentation/asciidoctor-extensions.rb b/Documentation/asciidoctor-extensions.rb\nindex f7a5982f8b..0089e0cfb8 100644\n--- a/Documentation/asciidoctor-extensions.rb\n+++ b/Documentation/asciidoctor-extensions.rb\n@@ -11,7 +11,7 @@ module Git\n       def process(parent, target, attrs)\n         if parent.document.basebackend? 'html'\n           prefix = parent.document.attr('git-relative-html-prefix')\n-          %(<a href=\"#{prefix}#{target}.html\">#{target}(#{attrs[1]})</a>\\n)\n+          %(<a href=\"#{prefix}#{target}.html\">#{target}(#{attrs[1]})</a>)\n         elsif parent.document.basebackend? 'docbook'\n           \"<citerefentry>\\n\" \\\n             \"<refentrytitle>#{target}</refentrytitle>\" \\\n-- \n2.21.0\n\n"},{"id":"371102","messageId":"20190311025952.GA6425@sigill.intra.peff.net","threadId":"50588","inReplyTo":"cover.1552230490.git.martin.agren@gmail.com","subject":"Re: [PATCH 0/2] fix spurious space after linkgit, now in *.html","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2019-03-11T02:59:52Z","receivedAt":"2019-03-11T02:59:55Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Sun, Mar 10, 2019 at 04:14:22PM +0100, Martin Ågren wrote:\n\n> [1] I could have sworn I checked the html docs and saw that they didn't\n> have this extra space. Looking at git-scm.com again reveals that it's\n> not there. Huh. Seems like the site's html-rendering doesn't go through our\n> Makefile at all and handles \"linkgit:\" on its own:\n> https://github.com/git/git-scm.com/blob/master/script/doc_importer\n\nCorrect. It significantly predates any support for asciidoctor in our\nMakefile, and needs to do some custom ruby-level tweaking (though\npossibly that could be cleaned up these days).\n\nThe doc_importer script you found, though, is not part of that process.\nI _think_ it's just leftover cruft. The actual import and conversion\nhappens as part of the rake task in:\n\n  https://github.com/git/git-scm.com/blob/master/lib/tasks/index.rake\n\n(Not that any of this matters for your series; just sprinkling some fun\nfacts into the conversation).\n\n-Peff\n"},{"id":"371103","messageId":"xmqqk1h6kt9z.fsf@gitster-ct.c.googlers.com","threadId":"50588","inReplyTo":"cover.1552230490.git.martin.agren@gmail.com","subject":"Re: [PATCH 0/2] fix spurious space after linkgit, now in *.html","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2019-03-11T03:02:32Z","receivedAt":"2019-03-11T03:02:36Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Martin Ågren <martin.agren@gmail.com> writes:\n\n> Bleh. For some reason [1] I thought the html-files were exempt from this\n> \"extra space after linkgit\" problem. They're not, as I just noticed. To\n> add insult to injury, my original patch 2 which adds a missing\n> dependency to the xml targets fails to add the exact same dependency for\n> a few other targets. So of the three patches discussed above, at least\n> two were incomplete.\n>\n> Since this has hit \"next\", here are two patches on top to address this.\n>\n> Sorry about this.\n\nThanks.  \n\nIf it makes it easier, we can eject ma/asciidoctor-fixes out of\n'next' when we rebuild 'next'.  I actually am tempted to start\n'next' from empty for this round after merging some obviously\ncorrect ones that are there to the 'master' branch.\n"},{"id":"371116","messageId":"CAN0heSo=qPvzqWA7Z4D2EXHw+DPOu70CS_wzR09Ot+aYYRufjA@mail.gmail.com","threadId":"50588","inReplyTo":"xmqqk1h6kt9z.fsf@gitster-ct.c.googlers.com","subject":"Re: [PATCH 0/2] fix spurious space after linkgit, now in *.html","fromName":"Martin Ågren","fromEmail":"martin.agren@gmail.com","sentAt":"2019-03-11T05:40:04Z","receivedAt":"2019-03-11T05:40:18Z","isPatch":true,"sender":{"key":"martin.agren@gmail.com","avatar":null},"body":"On Mon, 11 Mar 2019 at 04:02, Junio C Hamano <gitster@pobox.com> wrote:\n>\n> Martin Ågren <martin.agren@gmail.com> writes:\n>\n> > Since this has hit \"next\", here are two patches on top to address this.\n> >\n> > Sorry about this.\n>\n> Thanks.\n>\n> If it makes it easier, we can eject ma/asciidoctor-fixes out of\n> 'next' when we rebuild 'next'.  I actually am tempted to start\n> 'next' from empty for this round after merging some obviously\n> correct ones that are there to the 'master' branch.\n\nOk, then I'll take that offer. I'll squash these two patches into the\noriginal series. Thanks.\n\nMartin\n"},{"id":"371117","messageId":"CAN0heSqpZRaEjZpRAizy6wudf+fAAOwJWYdtf7OJP3SRoXf1Sw@mail.gmail.com","threadId":"50588","inReplyTo":"20190311025952.GA6425@sigill.intra.peff.net","subject":"Re: [PATCH 0/2] fix spurious space after linkgit, now in *.html","fromName":"Martin Ågren","fromEmail":"martin.agren@gmail.com","sentAt":"2019-03-11T05:47:32Z","receivedAt":"2019-03-11T05:47:46Z","isPatch":true,"sender":{"key":"martin.agren@gmail.com","avatar":null},"body":"On Mon, 11 Mar 2019 at 03:59, Jeff King <peff@peff.net> wrote:\n>\n> On Sun, Mar 10, 2019 at 04:14:22PM +0100, Martin Ågren wrote:\n>\n> > [1] I could have sworn I checked the html docs and saw that they didn't\n> > have this extra space. Looking at git-scm.com again reveals that it's\n> > not there. Huh. Seems like the site's html-rendering doesn't go through our\n> > Makefile at all and handles \"linkgit:\" on its own:\n> > https://github.com/git/git-scm.com/blob/master/script/doc_importer\n>\n> Correct. It significantly predates any support for asciidoctor in our\n> Makefile, and needs to do some custom ruby-level tweaking (though\n> possibly that could be cleaned up these days).\n>\n> The doc_importer script you found, though, is not part of that process.\n> I _think_ it's just leftover cruft. The actual import and conversion\n> happens as part of the rake task in:\n>\n>   https://github.com/git/git-scm.com/blob/master/lib/tasks/index.rake\n>\n> (Not that any of this matters for your series; just sprinkling some fun\n> facts into the conversation).\n\nThanks for this background info, and for the correct link. :-)\n\nMartin\n"},{"id":"371130","messageId":"xmqq4l89kbkr.fsf@gitster-ct.c.googlers.com","threadId":"50588","inReplyTo":"CAN0heSo=qPvzqWA7Z4D2EXHw+DPOu70CS_wzR09Ot+aYYRufjA@mail.gmail.com","subject":"Re: [PATCH 0/2] fix spurious space after linkgit, now in *.html","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2019-03-11T09:24:52Z","receivedAt":"2019-03-11T09:24:56Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Martin Ågren <martin.agren@gmail.com> writes:\n\n> Ok, then I'll take that offer. I'll squash these two patches into the\n> original series. Thanks.\n\nOur mails might cross, but just in case you haven't started, here\nare the locally squashed results with updated log messages.\n"},{"id":"371131","messageId":"20190311092605.259322-1-gitster@pobox.com","threadId":"50588","inReplyTo":"xmqq4l89kbkr.fsf@gitster-ct.c.googlers.com","subject":"[PATCH v3 1/3] Documentation/Makefile: add missing xsl dependencies for manpages","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2019-03-11T09:26:03Z","receivedAt":"2019-03-11T09:26:10Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"From: Martin Ågren <martin.agren@gmail.com>\n\nThese stylesheets very rarely change, but when they do, it really helps\nif the manpages depend on them. We're casting the net a bit too wide\nhere, since we'll only ever use a subset of the stylesheets, but since\nthese files change so rarely, that should be ok. It's better than\nmissing a dependency.\n\nObserve that manpage-base-url.xsl is a generated file, so we need to\nlist it explicitly, besides the `wildcard` expression we're adding here.\n\nSigned-off-by: Martin Ågren <martin.agren@gmail.com>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n Documentation/Makefile | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/Documentation/Makefile b/Documentation/Makefile\nindex d5d936e6a7..ea6b8e5d72 100644\n--- a/Documentation/Makefile\n+++ b/Documentation/Makefile\n@@ -347,7 +347,7 @@ $(OBSOLETE_HTML): %.html : %.txto asciidoc.conf\n manpage-base-url.xsl: manpage-base-url.xsl.in\n \t$(QUIET_GEN)sed \"s|@@MAN_BASE_URL@@|$(MAN_BASE_URL)|\" $< > $@\n \n-%.1 %.5 %.7 : %.xml manpage-base-url.xsl\n+%.1 %.5 %.7 : %.xml manpage-base-url.xsl $(wildcard manpage*.xsl)\n \t$(QUIET_XMLTO)$(RM) $@ && \\\n \t$(XMLTO) -m $(MANPAGE_XSL) $(XMLTO_EXTRA) man $<\n \n-- \n2.21.0-155-ge902e9bcae\n\n"},{"id":"371132","messageId":"20190311092605.259322-2-gitster@pobox.com","threadId":"50588","inReplyTo":"20190311092605.259322-1-gitster@pobox.com","subject":"[PATCH v3 2/3] Documentation/Makefile: add missing dependency on asciidoctor-extensions","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2019-03-11T09:26:04Z","receivedAt":"2019-03-11T09:26:12Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"From: Martin Ågren <martin.agren@gmail.com>\n\nasciidoctor-extensions.rb has never changed, but when it does -- such as\nin the next commit --, it helps if the xml-files depend on it. We're\ncasting the net a bit too wide here, since we'll be rebuilding even with\nAsciiDoc, which won't look at this file. But since this file changes so\nrarely, that should be ok. It's better than missing a dependency.\n\nSimilarly, most of the html-files are produced directly from \".txt';\nmake the html-files too depend on asciidoctor-extensions.rb, both\nthe HTMLified manual pages as well as the user-manual that does use\n.xml intermediary.\n\nSigned-off-by: Martin Ågren <martin.agren@gmail.com>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n Documentation/Makefile | 8 ++++----\n 1 file changed, 4 insertions(+), 4 deletions(-)\n\ndiff --git a/Documentation/Makefile b/Documentation/Makefile\nindex ea6b8e5d72..f58904a929 100644\n--- a/Documentation/Makefile\n+++ b/Documentation/Makefile\n@@ -334,12 +334,12 @@ clean:\n \t$(RM) $(cmds_txt) $(mergetools_txt) *.made\n \t$(RM) manpage-base-url.xsl\n \n-$(MAN_HTML): %.html : %.txt asciidoc.conf\n+$(MAN_HTML): %.html : %.txt asciidoc.conf asciidoctor-extensions.rb\n \t$(QUIET_ASCIIDOC)$(RM) $@+ $@ && \\\n \t$(TXT_TO_HTML) -d manpage -o $@+ $< && \\\n \tmv $@+ $@\n \n-$(OBSOLETE_HTML): %.html : %.txto asciidoc.conf\n+$(OBSOLETE_HTML): %.html : %.txto asciidoc.conf asciidoctor-extensions.rb\n \t$(QUIET_ASCIIDOC)$(RM) $@+ $@ && \\\n \t$(TXT_TO_HTML) -o $@+ $< && \\\n \tmv $@+ $@\n@@ -351,12 +351,12 @@ manpage-base-url.xsl: manpage-base-url.xsl.in\n \t$(QUIET_XMLTO)$(RM) $@ && \\\n \t$(XMLTO) -m $(MANPAGE_XSL) $(XMLTO_EXTRA) man $<\n \n-%.xml : %.txt asciidoc.conf\n+%.xml : %.txt asciidoc.conf asciidoctor-extensions.rb\n \t$(QUIET_ASCIIDOC)$(RM) $@+ $@ && \\\n \t$(TXT_TO_XML) -d manpage -o $@+ $< && \\\n \tmv $@+ $@\n \n-user-manual.xml: user-manual.txt user-manual.conf\n+user-manual.xml: user-manual.txt user-manual.conf asciidoctor-extensions.rb\n \t$(QUIET_ASCIIDOC)$(RM) $@+ $@ && \\\n \t$(TXT_TO_XML) -d book -o $@+ $< && \\\n \tmv $@+ $@\n-- \n2.21.0-155-ge902e9bcae\n\n"},{"id":"371133","messageId":"20190311092605.259322-3-gitster@pobox.com","threadId":"50588","inReplyTo":"20190311092605.259322-1-gitster@pobox.com","subject":"[PATCH v3 3/3] asciidoctor-extensions: fix spurious space after linkgit","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2019-03-11T09:26:05Z","receivedAt":"2019-03-11T09:26:13Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"From: Martin Ågren <martin.agren@gmail.com>\n\nWhen we render, e.g., \"linkgit:gitglossary[7].\" with Asciidoctor, we get\n\"gitglossary(7) .\" with a space between the linkgit macro expansion and\nthe punctuation. We can fix this by dropping the trailing newline after\nwe've turned `linkgit:foo[bar]` into `<citerefentry>..</citerefentry>`.\n\nThe diff produced by `USE_ASCIIDOCTOR=Yes ./doc-diff HEAD^ HEAD` is\nalmost 6000 lines large and shows how this fixes \"git-foo(x) ,\", \"(see\ngit-bar(y) )\" and so on. One might wonder whether this also turns, e.g.,\n\"see linkgit:foo[1] for more\" into \"see foo(1)for more\", but no. We get\n\"...</citerefentry> for more\" in the XML, see, e.g., git-am.xml, so the\nspace ends up in git-am.1 just fine. The same is true for the HTML output.\n\nSigned-off-by: Martin Ågren <martin.agren@gmail.com>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n Documentation/asciidoctor-extensions.rb | 4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/Documentation/asciidoctor-extensions.rb b/Documentation/asciidoctor-extensions.rb\nindex ec83b4959e..0089e0cfb8 100644\n--- a/Documentation/asciidoctor-extensions.rb\n+++ b/Documentation/asciidoctor-extensions.rb\n@@ -11,12 +11,12 @@ module Git\n       def process(parent, target, attrs)\n         if parent.document.basebackend? 'html'\n           prefix = parent.document.attr('git-relative-html-prefix')\n-          %(<a href=\"#{prefix}#{target}.html\">#{target}(#{attrs[1]})</a>\\n)\n+          %(<a href=\"#{prefix}#{target}.html\">#{target}(#{attrs[1]})</a>)\n         elsif parent.document.basebackend? 'docbook'\n           \"<citerefentry>\\n\" \\\n             \"<refentrytitle>#{target}</refentrytitle>\" \\\n             \"<manvolnum>#{attrs[1]}</manvolnum>\\n\" \\\n-          \"</citerefentry>\\n\"\n+          \"</citerefentry>\"\n         end\n       end\n     end\n-- \n2.21.0-155-ge902e9bcae\n\n"},{"id":"371141","messageId":"CAN0heSrPfwzzMA6yLFfvE6d7wh8ciVXOP9suyfsC6o1DHyv+DA@mail.gmail.com","threadId":"50588","inReplyTo":"xmqq4l89kbkr.fsf@gitster-ct.c.googlers.com","subject":"Re: [PATCH 0/2] fix spurious space after linkgit, now in *.html","fromName":"Martin Ågren","fromEmail":"martin.agren@gmail.com","sentAt":"2019-03-11T11:02:58Z","receivedAt":"2019-03-11T11:03:13Z","isPatch":true,"sender":{"key":"martin.agren@gmail.com","avatar":null},"body":"On Mon, 11 Mar 2019 at 10:24, Junio C Hamano <gitster@pobox.com> wrote:\n>\n> Martin Ågren <martin.agren@gmail.com> writes:\n>\n> > Ok, then I'll take that offer. I'll squash these two patches into the\n> > original series. Thanks.\n>\n> Our mails might cross, but just in case you haven't started, here\n> are the locally squashed results with updated log messages.\n\nThank you so much! This looks good to me.\n\nMartin\n"}]}