{"thread":{"id":"51813","subject":"[PATCH 0/7] Fix more AsciiDoc/tor differences","startedAt":"2019-09-07T14:13:23Z","lastAt":"2019-09-13T12:21:54Z","messageCount":10,"participants":["Martin Ågren","Jeff King"],"isPatch":true,"patchVersion":1,"patchTotal":7},"messages":[{"id":"382013","messageId":"cover.1567707999.git.martin.agren@gmail.com","threadId":"51813","inReplyTo":null,"subject":"[PATCH 0/7] Fix more AsciiDoc/tor differences","fromName":"Martin Ågren","fromEmail":"martin.agren@gmail.com","sentAt":"2019-09-07T14:12:46Z","receivedAt":"2019-09-07T14:13:23Z","isPatch":true,"sender":{"key":"martin.agren@gmail.com","avatar":null},"body":"This series roughly halves the line count of `./doc-diff --from-asciidoc\n--to-asciidoctor --cut-header-footer HEAD HEAD`. Together with my recent\n(independent) mini-series [1], I claim that Asciidoctor 1.5.5 now\nprocesses the manpages better than AsciiDoc 8.6.10 does.\n\nPatch 6/7 actually changes the rendering with both engines, so that they\nlook nice and the same. The other patches are all no-ops with one engine\nwhile fixing things with the other -- they all improve the situation\nwith Asciidoctor (which is what I care most about) except patch 1/7\nwhich goes the other way (it reduces the doc-diff, which helps).\n\nPatch 7/7 has an element of black magic to it. I wouldn't be too\nsurprised if I've managed to appease my particular versions of these\ntools while not fixing -- or maybe even breaking? -- some other versions\n[that people actually use]. That's where I think a quick test would be\nthe most valuable.\n\nI've based this on maint on the assumption that these are bugfixes. (I\nknow I've been bad on basing similar work off of maint.) This causes a\nconflict with master and pu in config.txt, which has learned about\n\"includeIf onbranch:foo-branch\" in the meantime. Maybe I've made the\nwrong call here -- Junio, if you'd rather have me submit this on master,\njust let me know.\n\n[1] https://public-inbox.org/git/cover.1567534373.git.martin.agren@gmail.com/\n\nMartin Ågren (7):\n  Documentation: wrap blocks with \"--\"\n  git-merge-base.txt: render indentations correctly under Asciidoctor\n  Documentation: wrap config listings in \"----\"\n  git-ls-remote.txt: wrap shell listing in \"----\"\n  git-receive-pack.txt: wrap shell [script] listing in \"----\"\n  git-merge-index.txt: wrap shell listing in \"----\"\n  gitweb.conf.txt: switch pluses to backticks to help Asciidoctor\n\n Documentation/config.txt           | 84 ++++++++++++-------------\n Documentation/git-commit.txt       |  8 ++-\n Documentation/git-config.txt       | 56 +++++++++--------\n Documentation/git-ls-remote.txt    | 32 +++++-----\n Documentation/git-merge-base.txt   | 98 +++++++++++++++++-------------\n Documentation/git-merge-index.txt  | 26 ++++----\n Documentation/git-receive-pack.txt | 52 ++++++++--------\n Documentation/git-send-email.txt   | 12 ++--\n Documentation/git-status.txt       | 18 +++---\n Documentation/gitmodules.txt       | 15 ++---\n Documentation/gitweb.conf.txt      |  6 +-\n 11 files changed, 223 insertions(+), 184 deletions(-)\n\n-- \n2.23.0\n\n"},{"id":"382014","messageId":"93df070965c1222d5e00909ed3930dce299e1541.1567707999.git.martin.agren@gmail.com","threadId":"51813","inReplyTo":"cover.1567707999.git.martin.agren@gmail.com","subject":"[PATCH 4/7] git-ls-remote.txt: wrap shell listing in \"----\"","fromName":"Martin Ågren","fromEmail":"martin.agren@gmail.com","sentAt":"2019-09-07T14:12:50Z","receivedAt":"2019-09-07T14:13:23Z","isPatch":true,"sender":{"key":"martin.agren@gmail.com","avatar":null},"body":"The second \"column\" in the output of `git ls-remote` is typeset\ndifferently by AsciiDoc and Asciidoctor, similar to various examples\ntouched by the last few commits.\n\nFix this by marking the example shell session as a code listing by\nwrapping it in \"----\".  Because this gives us some extra indentation, we\ncan remove the one that we have been carrying explicitly. That is, drop\nthe first tab of indentation on each line. With AsciiDoc, this results\nin identical rendering before and after this commit. Asciidoctor now\nrenders this the same as AsciiDoc does.\n\nSigned-off-by: Martin Ågren <martin.agren@gmail.com>\n---\n Documentation/git-ls-remote.txt | 32 +++++++++++++++++---------------\n 1 file changed, 17 insertions(+), 15 deletions(-)\n\ndiff --git a/Documentation/git-ls-remote.txt b/Documentation/git-ls-remote.txt\nindex 0b057cbb10..a2ea1fd687 100644\n--- a/Documentation/git-ls-remote.txt\n+++ b/Documentation/git-ls-remote.txt\n@@ -92,21 +92,23 @@ OPTIONS\n EXAMPLES\n --------\n \n-\t$ git ls-remote --tags ./.\n-\td6602ec5194c87b0fc87103ca4d67251c76f233a\trefs/tags/v0.99\n-\tf25a265a342aed6041ab0cc484224d9ca54b6f41\trefs/tags/v0.99.1\n-\t7ceca275d047c90c0c7d5afb13ab97efdf51bd6e\trefs/tags/v0.99.3\n-\tc5db5456ae3b0873fc659c19fafdde22313cc441\trefs/tags/v0.99.2\n-\t0918385dbd9656cab0d1d81ba7453d49bbc16250\trefs/tags/junio-gpg-pub\n-\t$ git ls-remote http://www.kernel.org/pub/scm/git/git.git master pu rc\n-\t5fe978a5381f1fbad26a80e682ddd2a401966740\trefs/heads/master\n-\tc781a84b5204fb294c9ccc79f8b3baceeb32c061\trefs/heads/pu\n-\t$ git remote add korg http://www.kernel.org/pub/scm/git/git.git\n-\t$ git ls-remote --tags korg v\\*\n-\td6602ec5194c87b0fc87103ca4d67251c76f233a\trefs/tags/v0.99\n-\tf25a265a342aed6041ab0cc484224d9ca54b6f41\trefs/tags/v0.99.1\n-\tc5db5456ae3b0873fc659c19fafdde22313cc441\trefs/tags/v0.99.2\n-\t7ceca275d047c90c0c7d5afb13ab97efdf51bd6e\trefs/tags/v0.99.3\n+----\n+$ git ls-remote --tags ./.\n+d6602ec5194c87b0fc87103ca4d67251c76f233a\trefs/tags/v0.99\n+f25a265a342aed6041ab0cc484224d9ca54b6f41\trefs/tags/v0.99.1\n+7ceca275d047c90c0c7d5afb13ab97efdf51bd6e\trefs/tags/v0.99.3\n+c5db5456ae3b0873fc659c19fafdde22313cc441\trefs/tags/v0.99.2\n+0918385dbd9656cab0d1d81ba7453d49bbc16250\trefs/tags/junio-gpg-pub\n+$ git ls-remote http://www.kernel.org/pub/scm/git/git.git master pu rc\n+5fe978a5381f1fbad26a80e682ddd2a401966740\trefs/heads/master\n+c781a84b5204fb294c9ccc79f8b3baceeb32c061\trefs/heads/pu\n+$ git remote add korg http://www.kernel.org/pub/scm/git/git.git\n+$ git ls-remote --tags korg v\\*\n+d6602ec5194c87b0fc87103ca4d67251c76f233a\trefs/tags/v0.99\n+f25a265a342aed6041ab0cc484224d9ca54b6f41\trefs/tags/v0.99.1\n+c5db5456ae3b0873fc659c19fafdde22313cc441\trefs/tags/v0.99.2\n+7ceca275d047c90c0c7d5afb13ab97efdf51bd6e\trefs/tags/v0.99.3\n+----\n \n SEE ALSO\n --------\n-- \n2.23.0\n\n"},{"id":"382015","messageId":"4c6e89fbeb3b76ec1cd8d12d00da2e8d9c77f6bd.1567707999.git.martin.agren@gmail.com","threadId":"51813","inReplyTo":"cover.1567707999.git.martin.agren@gmail.com","subject":"[PATCH 1/7] Documentation: wrap blocks with \"--\"","fromName":"Martin Ågren","fromEmail":"martin.agren@gmail.com","sentAt":"2019-09-07T14:12:47Z","receivedAt":"2019-09-07T14:13:23Z","isPatch":true,"sender":{"key":"martin.agren@gmail.com","avatar":null},"body":"The documentation for each of these options contains a list. After the\nlist, AsciiDoc interprets the continuation as a continuation of the\n*list*, not as a continution of the larger block. As a result, we get\ntoo much indentation. Wrap the entire blocks in \"--\" to fix this. With\nAsciidoctor, this commit is a no-op, and the two programs now render\nthese identically.\n\nThese two files share the same problem and indeed, they both document\n`--untracked-files` in quite similar ways. I haven't checked to what\nextent that is intentional or warranted, and to what extent they have\nsimply drifted apart. I consider such an investigation and possible\ncleanup as out of scope for this commit and this patch series.\n\nSigned-off-by: Martin Ågren <martin.agren@gmail.com>\n---\n Documentation/git-commit.txt |  8 +++++---\n Documentation/git-status.txt | 18 +++++++++++-------\n 2 files changed, 16 insertions(+), 10 deletions(-)\n\ndiff --git a/Documentation/git-commit.txt b/Documentation/git-commit.txt\nindex a85c2c2a4c..e43dad26f5 100644\n--- a/Documentation/git-commit.txt\n+++ b/Documentation/git-commit.txt\n@@ -282,18 +282,20 @@ FROM UPSTREAM REBASE\" section in linkgit:git-rebase[1].)\n --untracked-files[=<mode>]::\n \tShow untracked files.\n +\n+--\n The mode parameter is optional (defaults to 'all'), and is used to\n specify the handling of untracked files; when -u is not used, the\n default is 'normal', i.e. show untracked files and directories.\n-+\n+\n The possible options are:\n-+\n+\n \t- 'no'     - Show no untracked files\n \t- 'normal' - Shows untracked files and directories\n \t- 'all'    - Also shows individual files in untracked directories.\n-+\n+\n The default can be changed using the status.showUntrackedFiles\n configuration variable documented in linkgit:git-config[1].\n+--\n \n -v::\n --verbose::\ndiff --git a/Documentation/git-status.txt b/Documentation/git-status.txt\nindex d4e8f24f0c..7731b45f07 100644\n--- a/Documentation/git-status.txt\n+++ b/Documentation/git-status.txt\n@@ -59,16 +59,17 @@ This is optional and defaults to the original version 'v1' format.\n --untracked-files[=<mode>]::\n \tShow untracked files.\n +\n+--\n The mode parameter is used to specify the handling of untracked files.\n It is optional: it defaults to 'all', and if specified, it must be\n stuck to the option (e.g. `-uno`, but not `-u no`).\n-+\n+\n The possible options are:\n-+\n+\n \t- 'no'     - Show no untracked files.\n \t- 'normal' - Shows untracked files and directories.\n \t- 'all'    - Also shows individual files in untracked directories.\n-+\n+\n When `-u` option is not used, untracked files and directories are\n shown (i.e. the same as specifying `normal`), to help you avoid\n forgetting to add newly created files.  Because it takes extra work\n@@ -78,9 +79,10 @@ Consider enabling untracked cache and split index if supported (see\n `git update-index --untracked-cache` and `git update-index\n --split-index`), Otherwise you can use `no` to have `git status`\n return more quickly without showing untracked files.\n-+\n+\n The default can be changed using the status.showUntrackedFiles\n configuration variable documented in linkgit:git-config[1].\n+--\n \n --ignore-submodules[=<when>]::\n \tIgnore changes to submodules when looking for changes. <when> can be\n@@ -100,11 +102,12 @@ configuration variable documented in linkgit:git-config[1].\n --ignored[=<mode>]::\n \tShow ignored files as well.\n +\n+--\n The mode parameter is used to specify the handling of ignored files.\n It is optional: it defaults to 'traditional'.\n-+\n+\n The possible options are:\n-+\n+\n \t- 'traditional' - Shows ignored files and directories, unless\n \t\t\t  --untracked-files=all is specified, in which case\n \t\t\t  individual files in ignored directories are\n@@ -112,12 +115,13 @@ The possible options are:\n \t- 'no'\t        - Show no ignored files.\n \t- 'matching'    - Shows ignored files and directories matching an\n \t\t\t  ignore pattern.\n-+\n+\n When 'matching' mode is specified, paths that explicitly match an\n ignored pattern are shown. If a directory matches an ignore pattern,\n then it is shown, but not paths contained in the ignored directory. If\n a directory does not match an ignore pattern, but all contents are\n ignored, then the directory is not shown, but all contents are shown.\n+--\n \n -z::\n \tTerminate entries with NUL, instead of LF.  This implies\n-- \n2.23.0\n\n"},{"id":"382016","messageId":"2a8cc66dff38f3e5bf9220a06440382ae2641fea.1567707999.git.martin.agren@gmail.com","threadId":"51813","inReplyTo":"cover.1567707999.git.martin.agren@gmail.com","subject":"[PATCH 3/7] Documentation: wrap config listings in \"----\"","fromName":"Martin Ågren","fromEmail":"martin.agren@gmail.com","sentAt":"2019-09-07T14:12:49Z","receivedAt":"2019-09-07T14:13:23Z","isPatch":true,"sender":{"key":"martin.agren@gmail.com","avatar":null},"body":"The indented lines in these example config-file listings are indented\ndifferently by AsciiDoc and Asciidoctor.\n\nFix this by marking the example config-files as code listings by\nwrapping them in \"----\". Because this gives us some extra indentation,\nwe can remove the one that we have been carrying explicitly. That is,\ndrop the first tab of indentation on each line.\n\nWith AsciiDoc, this results in identical rendering before and after this\ncommit. Asciidoctor now renders this the same as AsciiDoc does.\n\ngit-config.txt pretty consistently uses twelve dashes rather than the\nminimum four to spell \"----\". Let's stick to the file-local convention\nthere.\n\nSigned-off-by: Martin Ågren <martin.agren@gmail.com>\n---\n Documentation/config.txt         | 84 ++++++++++++++++----------------\n Documentation/git-config.txt     | 56 +++++++++++----------\n Documentation/git-send-email.txt | 12 +++--\n Documentation/gitmodules.txt     | 15 +++---\n 4 files changed, 87 insertions(+), 80 deletions(-)\n\ndiff --git a/Documentation/config.txt b/Documentation/config.txt\nindex 7e2a6f61f5..f7cd0ae584 100644\n--- a/Documentation/config.txt\n+++ b/Documentation/config.txt\n@@ -164,47 +164,49 @@ to either specify only the realpath version, or both versions.\n Example\n ~~~~~~~\n \n-\t# Core variables\n-\t[core]\n-\t\t; Don't trust file modes\n-\t\tfilemode = false\n-\n-\t# Our diff algorithm\n-\t[diff]\n-\t\texternal = /usr/local/bin/diff-wrapper\n-\t\trenames = true\n-\n-\t[branch \"devel\"]\n-\t\tremote = origin\n-\t\tmerge = refs/heads/devel\n-\n-\t# Proxy settings\n-\t[core]\n-\t\tgitProxy=\"ssh\" for \"kernel.org\"\n-\t\tgitProxy=default-proxy ; for the rest\n-\n-\t[include]\n-\t\tpath = /path/to/foo.inc ; include by absolute path\n-\t\tpath = foo.inc ; find \"foo.inc\" relative to the current file\n-\t\tpath = ~/foo.inc ; find \"foo.inc\" in your `$HOME` directory\n-\n-\t; include if $GIT_DIR is /path/to/foo/.git\n-\t[includeIf \"gitdir:/path/to/foo/.git\"]\n-\t\tpath = /path/to/foo.inc\n-\n-\t; include for all repositories inside /path/to/group\n-\t[includeIf \"gitdir:/path/to/group/\"]\n-\t\tpath = /path/to/foo.inc\n-\n-\t; include for all repositories inside $HOME/to/group\n-\t[includeIf \"gitdir:~/to/group/\"]\n-\t\tpath = /path/to/foo.inc\n-\n-\t; relative paths are always relative to the including\n-\t; file (if the condition is true); their location is not\n-\t; affected by the condition\n-\t[includeIf \"gitdir:/path/to/group/\"]\n-\t\tpath = foo.inc\n+----\n+# Core variables\n+[core]\n+\t; Don't trust file modes\n+\tfilemode = false\n+\n+# Our diff algorithm\n+[diff]\n+\texternal = /usr/local/bin/diff-wrapper\n+\trenames = true\n+\n+[branch \"devel\"]\n+\tremote = origin\n+\tmerge = refs/heads/devel\n+\n+# Proxy settings\n+[core]\n+\tgitProxy=\"ssh\" for \"kernel.org\"\n+\tgitProxy=default-proxy ; for the rest\n+\n+[include]\n+\tpath = /path/to/foo.inc ; include by absolute path\n+\tpath = foo.inc ; find \"foo.inc\" relative to the current file\n+\tpath = ~/foo.inc ; find \"foo.inc\" in your `$HOME` directory\n+\n+; include if $GIT_DIR is /path/to/foo/.git\n+[includeIf \"gitdir:/path/to/foo/.git\"]\n+\tpath = /path/to/foo.inc\n+\n+; include for all repositories inside /path/to/group\n+[includeIf \"gitdir:/path/to/group/\"]\n+\tpath = /path/to/foo.inc\n+\n+; include for all repositories inside $HOME/to/group\n+[includeIf \"gitdir:~/to/group/\"]\n+\tpath = /path/to/foo.inc\n+\n+; relative paths are always relative to the including\n+; file (if the condition is true); their location is not\n+; affected by the condition\n+[includeIf \"gitdir:/path/to/group/\"]\n+\tpath = foo.inc\n+----\n \n Values\n ~~~~~~\ndiff --git a/Documentation/git-config.txt b/Documentation/git-config.txt\nindex ff9310f958..899e92a1c9 100644\n--- a/Documentation/git-config.txt\n+++ b/Documentation/git-config.txt\n@@ -339,33 +339,35 @@ EXAMPLES\n \n Given a .git/config like this:\n \n-\t#\n-\t# This is the config file, and\n-\t# a '#' or ';' character indicates\n-\t# a comment\n-\t#\n-\n-\t; core variables\n-\t[core]\n-\t\t; Don't trust file modes\n-\t\tfilemode = false\n-\n-\t; Our diff algorithm\n-\t[diff]\n-\t\texternal = /usr/local/bin/diff-wrapper\n-\t\trenames = true\n-\n-\t; Proxy settings\n-\t[core]\n-\t\tgitproxy=proxy-command for kernel.org\n-\t\tgitproxy=default-proxy ; for all the rest\n-\n-\t; HTTP\n-\t[http]\n-\t\tsslVerify\n-\t[http \"https://weak.example.com\"]\n-\t\tsslVerify = false\n-\t\tcookieFile = /tmp/cookie.txt\n+------------\n+#\n+# This is the config file, and\n+# a '#' or ';' character indicates\n+# a comment\n+#\n+\n+; core variables\n+[core]\n+\t; Don't trust file modes\n+\tfilemode = false\n+\n+; Our diff algorithm\n+[diff]\n+\texternal = /usr/local/bin/diff-wrapper\n+\trenames = true\n+\n+; Proxy settings\n+[core]\n+\tgitproxy=proxy-command for kernel.org\n+\tgitproxy=default-proxy ; for all the rest\n+\n+; HTTP\n+[http]\n+\tsslVerify\n+[http \"https://weak.example.com\"]\n+\tsslVerify = false\n+\tcookieFile = /tmp/cookie.txt\n+------------\n \n you can set the filemode to true with\n \ndiff --git a/Documentation/git-send-email.txt b/Documentation/git-send-email.txt\nindex 504ae7fe76..b2909a3dc5 100644\n--- a/Documentation/git-send-email.txt\n+++ b/Documentation/git-send-email.txt\n@@ -478,11 +478,13 @@ Use gmail as the smtp server\n To use 'git send-email' to send your patches through the GMail SMTP server,\n edit ~/.gitconfig to specify your account settings:\n \n-\t[sendemail]\n-\t\tsmtpEncryption = tls\n-\t\tsmtpServer = smtp.gmail.com\n-\t\tsmtpUser = yourname@gmail.com\n-\t\tsmtpServerPort = 587\n+----\n+[sendemail]\n+\tsmtpEncryption = tls\n+\tsmtpServer = smtp.gmail.com\n+\tsmtpUser = yourname@gmail.com\n+\tsmtpServerPort = 587\n+----\n \n If you have multifactor authentication setup on your gmail account, you will\n need to generate an app-specific password for use with 'git send-email'. Visit\ndiff --git a/Documentation/gitmodules.txt b/Documentation/gitmodules.txt\nindex a66e95b70c..08c7b8a722 100644\n--- a/Documentation/gitmodules.txt\n+++ b/Documentation/gitmodules.txt\n@@ -105,14 +105,15 @@ EXAMPLES\n \n Consider the following .gitmodules file:\n \n-\t[submodule \"libfoo\"]\n-\t\tpath = include/foo\n-\t\turl = git://foo.com/git/lib.git\n-\n-\t[submodule \"libbar\"]\n-\t\tpath = include/bar\n-\t\turl = git://bar.com/git/lib.git\n+----\n+[submodule \"libfoo\"]\n+\tpath = include/foo\n+\turl = git://foo.com/git/lib.git\n \n+[submodule \"libbar\"]\n+\tpath = include/bar\n+\turl = git://bar.com/git/lib.git\n+----\n \n This defines two submodules, `libfoo` and `libbar`. These are expected to\n be checked out in the paths `include/foo` and `include/bar`, and for both\n-- \n2.23.0\n\n"},{"id":"382017","messageId":"4c548f2fcea3db674a70973ef6ce46b6f1095dfe.1567707999.git.martin.agren@gmail.com","threadId":"51813","inReplyTo":"cover.1567707999.git.martin.agren@gmail.com","subject":"[PATCH 2/7] git-merge-base.txt: render indentations correctly under Asciidoctor","fromName":"Martin Ågren","fromEmail":"martin.agren@gmail.com","sentAt":"2019-09-07T14:12:48Z","receivedAt":"2019-09-07T14:13:23Z","isPatch":true,"sender":{"key":"martin.agren@gmail.com","avatar":null},"body":"There are several graphs in this document. For most of them, we use a\nsingle leading tab to indent the whole graph, and then we use spaces\n(possibly eight or more) to align things within the graph.\n\nIn the larger graph, we use a different strategy: We use 1-N tabs and\njust a small number of spaces (<8). This is how we usually prefer to do\nour indenting, but Asciidoctor ends up rendering this differently from\nAsciiDoc. Same thing for the if-then-fi examples where the conditional\ncode is indented by two tabs, which renders differently under AsciiDoc\nand Asciidoctor.\n\nSimilar to 379805051d (\"Documentation: render revisions correctly under\nAsciidoctor\", 2018-05-06), use an explicit literal block to indicate\nthat we want to keep the leading whitespace in the tables. Change not\njust the ones that render differently, but all of them for consistency.\n\nBecause this gives us some extra indentation, we can remove the one that\nwe have been carrying explicitly. That is, drop the first tab of\nindentation on each line. With AsciiDoc, this results in identical\nrendering before and after this commit, both for git-merge-base.1 and\ngit-merge-base.html.\n\nA less intrusive change would be to replace tabs 2-N on each line with\neight spaces. But let's follow the example set by 379805051d, so that we\ncan use our preferred way of indenting.\n\nSigned-off-by: Martin Ågren <martin.agren@gmail.com>\n---\n Documentation/git-merge-base.txt | 98 +++++++++++++++++++-------------\n 1 file changed, 57 insertions(+), 41 deletions(-)\n\ndiff --git a/Documentation/git-merge-base.txt b/Documentation/git-merge-base.txt\nindex 9f07f4f6ed..411dca308b 100644\n--- a/Documentation/git-merge-base.txt\n+++ b/Documentation/git-merge-base.txt\n@@ -80,9 +80,11 @@ which is reachable from both 'A' and 'B' through the parent relationship.\n \n For example, with this topology:\n \n-\t         o---o---o---B\n-\t        /\n-\t---o---1---o---o---o---A\n+....\n+\t o---o---o---B\n+\t/\n+---o---1---o---o---o---A\n+....\n \n the merge base between 'A' and 'B' is '1'.\n \n@@ -90,21 +92,25 @@ Given three commits 'A', 'B' and 'C', `git merge-base A B C` will compute the\n merge base between 'A' and a hypothetical commit 'M', which is a merge\n between 'B' and 'C'.  For example, with this topology:\n \n-\t       o---o---o---o---C\n-\t      /\n-\t     /   o---o---o---B\n-\t    /   /\n-\t---2---1---o---o---o---A\n+....\n+       o---o---o---o---C\n+      /\n+     /   o---o---o---B\n+    /   /\n+---2---1---o---o---o---A\n+....\n \n the result of `git merge-base A B C` is '1'.  This is because the\n equivalent topology with a merge commit 'M' between 'B' and 'C' is:\n \n \n-\t       o---o---o---o---o\n-\t      /                 \\\n-\t     /   o---o---o---o---M\n-\t    /   /\n-\t---2---1---o---o---o---A\n+....\n+       o---o---o---o---o\n+      /                 \\\n+     /   o---o---o---o---M\n+    /   /\n+---2---1---o---o---o---A\n+....\n \n and the result of `git merge-base A M` is '1'.  Commit '2' is also a\n common ancestor between 'A' and 'M', but '1' is a better common ancestor,\n@@ -116,11 +122,13 @@ the best common ancestor of all commits.\n When the history involves criss-cross merges, there can be more than one\n 'best' common ancestor for two commits.  For example, with this topology:\n \n-\t---1---o---A\n-\t    \\ /\n-\t     X\n-\t    / \\\n-\t---2---o---o---B\n+....\n+---1---o---A\n+    \\ /\n+     X\n+    / \\\n+---2---o---o---B\n+....\n \n both '1' and '2' are merge-bases of A and B.  Neither one is better than\n the other (both are 'best' merge bases).  When the `--all` option is not given,\n@@ -131,18 +139,22 @@ and B is (or at least used to be) to compute the merge base between\n A and B, and check if it is the same as A, in which case, A is an\n ancestor of B.  You will see this idiom used often in older scripts.\n \n-\tA=$(git rev-parse --verify A)\n-\tif test \"$A\" = \"$(git merge-base A B)\"\n-\tthen\n-\t\t... A is an ancestor of B ...\n-\tfi\n+....\n+A=$(git rev-parse --verify A)\n+if test \"$A\" = \"$(git merge-base A B)\"\n+then\n+\t... A is an ancestor of B ...\n+fi\n+....\n \n In modern git, you can say this in a more direct way:\n \n-\tif git merge-base --is-ancestor A B\n-\tthen\n-\t\t... A is an ancestor of B ...\n-\tfi\n+....\n+if git merge-base --is-ancestor A B\n+then\n+\t... A is an ancestor of B ...\n+fi\n+....\n \n instead.\n \n@@ -154,13 +166,15 @@ topic origin/master`, the history of remote-tracking branch\n `origin/master` may have been rewound and rebuilt, leading to a\n history of this shape:\n \n-\t                 o---B2\n-\t                /\n-\t---o---o---B1--o---o---o---B (origin/master)\n-\t        \\\n-\t         B0\n-\t          \\\n-\t           D0---D1---D (topic)\n+....\n+\t\t o---B2\n+\t\t/\n+---o---o---B1--o---o---o---B (origin/master)\n+\t\\\n+\t B0\n+\t  \\\n+\t   D0---D1---D (topic)\n+....\n \n where `origin/master` used to point at commits B0, B1, B2 and now it\n points at B, and your `topic` branch was started on top of it back\n@@ -193,13 +207,15 @@ will find B0, and\n will replay D0, D1 and D on top of B to create a new history of this\n shape:\n \n-\t\t\t o---B2\n-\t\t\t/\n-\t---o---o---B1--o---o---o---B (origin/master)\n-\t\t\\                   \\\n-\t\t B0                  D0'--D1'--D' (topic - updated)\n-\t\t  \\\n-\t\t   D0---D1---D (topic - old)\n+....\n+\t\t o---B2\n+\t\t/\n+---o---o---B1--o---o---o---B (origin/master)\n+\t\\                   \\\n+\t B0                  D0'--D1'--D' (topic - updated)\n+\t  \\\n+\t   D0---D1---D (topic - old)\n+....\n \n A caveat is that older reflog entries in your repository may be\n expired by `git gc`.  If B0 no longer appears in the reflog of the\n-- \n2.23.0\n\n"},{"id":"382018","messageId":"6632bbac8c1cf943a439b69252d948f1ecf1de5f.1567707999.git.martin.agren@gmail.com","threadId":"51813","inReplyTo":"cover.1567707999.git.martin.agren@gmail.com","subject":"[PATCH 5/7] git-receive-pack.txt: wrap shell [script] listing in \"----\"","fromName":"Martin Ågren","fromEmail":"martin.agren@gmail.com","sentAt":"2019-09-07T14:12:51Z","receivedAt":"2019-09-07T14:13:25Z","isPatch":true,"sender":{"key":"martin.agren@gmail.com","avatar":null},"body":"The indented lines in the example shell script listing are indented\ndifferently by AsciiDoc and Asciidoctor.\n\nFix this by marking the example shell script as a code listing by\nwrapping it in \"----\".  Because this gives us some extra indentation, we\ncan remove the one that we have been carrying explicitly. That is, drop\nthe first tab of indentation on each line. For consistency, make the\nsame change to the short example shell session further down.\n\nWith AsciiDoc, this results in identical rendering before and after this\ncommit. Asciidoctor now renders this the same as AsciiDoc does.\n\nSigned-off-by: Martin Ågren <martin.agren@gmail.com>\n---\n Documentation/git-receive-pack.txt | 52 ++++++++++++++++--------------\n 1 file changed, 28 insertions(+), 24 deletions(-)\n\ndiff --git a/Documentation/git-receive-pack.txt b/Documentation/git-receive-pack.txt\nindex dedf97efbb..25702ed730 100644\n--- a/Documentation/git-receive-pack.txt\n+++ b/Documentation/git-receive-pack.txt\n@@ -165,29 +165,31 @@ ref listing the commits pushed to the repository, and logs the push\n certificates of signed pushes with good signatures to a logger\n service:\n \n-\t#!/bin/sh\n-\t# mail out commit update information.\n-\twhile read oval nval ref\n-\tdo\n-\t\tif expr \"$oval\" : '0*$' >/dev/null\n-\t\tthen\n-\t\t\techo \"Created a new ref, with the following commits:\"\n-\t\t\tgit rev-list --pretty \"$nval\"\n-\t\telse\n-\t\t\techo \"New commits:\"\n-\t\t\tgit rev-list --pretty \"$nval\" \"^$oval\"\n-\t\tfi |\n-\t\tmail -s \"Changes to ref $ref\" commit-list@mydomain\n-\tdone\n-\t# log signed push certificate, if any\n-\tif test -n \"${GIT_PUSH_CERT-}\" && test ${GIT_PUSH_CERT_STATUS} = G\n+----\n+#!/bin/sh\n+# mail out commit update information.\n+while read oval nval ref\n+do\n+\tif expr \"$oval\" : '0*$' >/dev/null\n \tthen\n-\t\t(\n-\t\t\techo expected nonce is ${GIT_PUSH_NONCE}\n-\t\t\tgit cat-file blob ${GIT_PUSH_CERT}\n-\t\t) | mail -s \"push certificate from $GIT_PUSH_CERT_SIGNER\" push-log@mydomain\n-\tfi\n-\texit 0\n+\t\techo \"Created a new ref, with the following commits:\"\n+\t\tgit rev-list --pretty \"$nval\"\n+\telse\n+\t\techo \"New commits:\"\n+\t\tgit rev-list --pretty \"$nval\" \"^$oval\"\n+\tfi |\n+\tmail -s \"Changes to ref $ref\" commit-list@mydomain\n+done\n+# log signed push certificate, if any\n+if test -n \"${GIT_PUSH_CERT-}\" && test ${GIT_PUSH_CERT_STATUS} = G\n+then\n+\t(\n+\t\techo expected nonce is ${GIT_PUSH_NONCE}\n+\t\tgit cat-file blob ${GIT_PUSH_CERT}\n+\t) | mail -s \"push certificate from $GIT_PUSH_CERT_SIGNER\" push-log@mydomain\n+fi\n+exit 0\n+----\n \n The exit code from this hook invocation is ignored, however a\n non-zero exit code will generate an error message.\n@@ -212,8 +214,10 @@ anyway.\n This hook can be used, for example, to run `git update-server-info`\n if the repository is packed and is served via a dumb transport.\n \n-\t#!/bin/sh\n-\texec git update-server-info\n+----\n+#!/bin/sh\n+exec git update-server-info\n+----\n \n \n QUARANTINE ENVIRONMENT\n-- \n2.23.0\n\n"},{"id":"382019","messageId":"19c355cbe5e39f48bba30e84e655100be62119d4.1567707999.git.martin.agren@gmail.com","threadId":"51813","inReplyTo":"cover.1567707999.git.martin.agren@gmail.com","subject":"[PATCH 7/7] gitweb.conf.txt: switch pluses to backticks to help Asciidoctor","fromName":"Martin Ågren","fromEmail":"martin.agren@gmail.com","sentAt":"2019-09-07T14:12:53Z","receivedAt":"2019-09-07T14:13:29Z","isPatch":true,"sender":{"key":"martin.agren@gmail.com","avatar":null},"body":"This paragraph uses a lot of +pluses+ to render text as monospace. That\nworks fine with AsciiDoc (8.6.10), and almost fine with Asciidoctor\n(1.5.5), which renders the third of these literally (\"+$projname+\"). The\nreason seems to be that Asciidoctor trips on the lone plus a bit\nearlier, even though it is escaped.\n\nSwitch +$projname+ to `$projname`, and change the next, similar instance\ntoo (+$projname/+), because otherwise, we'd trip on /that one/ instead.\nIf we would stop there, we would now start falling over on the escaped\nplus ('\\+') mentioned earlier, rendering /it/ literally. So change that\ntoo...\n\nIn other words, unescape the lone '+' and change all the pluses that\nfollow it to backticks.\n\nAsciiDoc renders this paragraph identically before and after this\ncommit, and Asciidoctor now renders this the same as AsciiDoc.\n\nI did try to switch the whole paragraph to using backticks rather than\npluses. That worked great with Asciidoctor, but confused AsciiDoc...\nLet's go with this rather surgical change instead.\n\nSigned-off-by: Martin Ågren <martin.agren@gmail.com>\n---\n Documentation/gitweb.conf.txt | 6 +++---\n 1 file changed, 3 insertions(+), 3 deletions(-)\n\ndiff --git a/Documentation/gitweb.conf.txt b/Documentation/gitweb.conf.txt\nindex 35317e71c8..7963a79ba9 100644\n--- a/Documentation/gitweb.conf.txt\n+++ b/Documentation/gitweb.conf.txt\n@@ -786,9 +786,9 @@ forks::\n \tsubdirectories of project root (basename) to be forks of existing\n \tprojects.  For each project +$projname.git+, projects in the\n \t+$projname/+ directory and its subdirectories will not be\n-\tshown in the main projects list.  Instead, a \\'\\+' mark is shown\n-\tnext to +$projname+, which links to a \"forks\" view that lists all\n-\tthe forks (all projects in +$projname/+ subdirectory).  Additionally\n+\tshown in the main projects list.  Instead, a \\'+' mark is shown\n+\tnext to `$projname`, which links to a \"forks\" view that lists all\n+\tthe forks (all projects in `$projname/` subdirectory).  Additionally\n \ta \"forks\" view for a project is linked from project summary page.\n +\n If the project list is taken from a file (+$projects_list+ points to a\n-- \n2.23.0\n\n"},{"id":"382020","messageId":"e948f00338e9a9f849d23fe7a88962cda34700fa.1567707999.git.martin.agren@gmail.com","threadId":"51813","inReplyTo":"cover.1567707999.git.martin.agren@gmail.com","subject":"[PATCH 6/7] git-merge-index.txt: wrap shell listing in \"----\"","fromName":"Martin Ågren","fromEmail":"martin.agren@gmail.com","sentAt":"2019-09-07T14:12:52Z","receivedAt":"2019-09-07T14:13:29Z","isPatch":true,"sender":{"key":"martin.agren@gmail.com","avatar":null},"body":"The example output of `git merge-index` has been enriched by a second\n\"column\" of helpful comments. When Asciidoctor renders this, the cells\nin that second column aren't aligned.\n\nFix this by marking the example shell session as a code listing by\nwrapping it in \"----\". Also drop some of the horizontal space between\nthe two columns so that we fit into 80 columns. This changes the\nrendering with both AsciiDoc and Asciidoctor. They now render this\nidentically, nicely aligned, and within 80 columns.\n\nSigned-off-by: Martin Ågren <martin.agren@gmail.com>\n---\n Documentation/git-merge-index.txt | 26 +++++++++++++++-----------\n 1 file changed, 15 insertions(+), 11 deletions(-)\n\ndiff --git a/Documentation/git-merge-index.txt b/Documentation/git-merge-index.txt\nindex 02676fb391..2ab84a91e5 100644\n--- a/Documentation/git-merge-index.txt\n+++ b/Documentation/git-merge-index.txt\n@@ -54,20 +54,24 @@ original is first. But the argument order to the 3-way merge program\n \n Examples:\n \n-  torvalds@ppc970:~/merge-test> git merge-index cat MM\n-  This is MM from the original tree.\t\t\t# original\n-  This is modified MM in the branch A.\t\t\t# merge1\n-  This is modified MM in the branch B.\t\t\t# merge2\n-  This is modified MM in the branch B.\t\t\t# current contents\n+----\n+torvalds@ppc970:~/merge-test> git merge-index cat MM\n+This is MM from the original tree.\t\t# original\n+This is modified MM in the branch A.\t\t# merge1\n+This is modified MM in the branch B.\t\t# merge2\n+This is modified MM in the branch B.\t\t# current contents\n+----\n \n or\n \n-  torvalds@ppc970:~/merge-test> git merge-index cat AA MM\n-  cat: : No such file or directory\n-  This is added AA in the branch A.\n-  This is added AA in the branch B.\n-  This is added AA in the branch B.\n-  fatal: merge program failed\n+----\n+torvalds@ppc970:~/merge-test> git merge-index cat AA MM\n+cat: : No such file or directory\n+This is added AA in the branch A.\n+This is added AA in the branch B.\n+This is added AA in the branch B.\n+fatal: merge program failed\n+----\n \n where the latter example shows how 'git merge-index' will stop trying to\n merge once anything has returned an error (i.e., `cat` returned an error\n-- \n2.23.0\n\n"},{"id":"382279","messageId":"20190913044828.GA21172@sigill.intra.peff.net","threadId":"51813","inReplyTo":"cover.1567707999.git.martin.agren@gmail.com","subject":"Re: [PATCH 0/7] Fix more AsciiDoc/tor differences","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2019-09-13T04:48:28Z","receivedAt":"2019-09-13T04:48:31Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Sat, Sep 07, 2019 at 04:12:46PM +0200, Martin Ågren wrote:\n\n> This series roughly halves the line count of `./doc-diff --from-asciidoc\n> --to-asciidoctor --cut-header-footer HEAD HEAD`. Together with my recent\n> (independent) mini-series [1], I claim that Asciidoctor 1.5.5 now\n> processes the manpages better than AsciiDoc 8.6.10 does.\n\nI looked these over, both source and rendered output (both with asciidoc\nand with asciidoctor 2.0.10), and they all look good to me.\n\nI think the delimited literal blocks are _slightly_ less pretty than the\nindented ones, but this is the solution we've been using for cross-tool\ncompatibility (and I think it's intentional in asciidoctor to deprecate\nthe indented blocks, because there are just too many corner cases). The\ndelimited ones are also easier to write correctly.\n\n> Patch 6/7 actually changes the rendering with both engines, so that they\n> look nice and the same. The other patches are all no-ops with one engine\n> while fixing things with the other -- they all improve the situation\n> with Asciidoctor (which is what I care most about) except patch 1/7\n> which goes the other way (it reduces the doc-diff, which helps).\n\nYeah, I agree that the change in 6/7 is an improvement (and 1/7 is an\nobvious bugfix looking at the doc-diff using just asciidoc).\n\n> Patch 7/7 has an element of black magic to it. I wouldn't be too\n> surprised if I've managed to appease my particular versions of these\n> tools while not fixing -- or maybe even breaking? -- some other versions\n> [that people actually use]. That's where I think a quick test would be\n> the most valuable.\n\nI can confirm that asciidoctor 2.0.10 has the same bogus output there\nbefore your patches, and that 7/7 fixes it.\n\n-Peff\n"},{"id":"382290","messageId":"CAN0heSrb6VnG2v0y=xsXjO=cDsM6atwLmZC6GRBLBQE+bSW8LA@mail.gmail.com","threadId":"51813","inReplyTo":"20190913044828.GA21172@sigill.intra.peff.net","subject":"Re: [PATCH 0/7] Fix more AsciiDoc/tor differences","fromName":"Martin Ågren","fromEmail":"martin.agren@gmail.com","sentAt":"2019-09-13T12:21:39Z","receivedAt":"2019-09-13T12:21:54Z","isPatch":true,"sender":{"key":"martin.agren@gmail.com","avatar":null},"body":"On Fri, 13 Sep 2019 at 06:48, Jeff King <peff@peff.net> wrote:\n>\n> On Sat, Sep 07, 2019 at 04:12:46PM +0200, Martin Ågren wrote:\n>\n> > This series roughly halves the line count of `./doc-diff --from-asciidoc\n> > --to-asciidoctor --cut-header-footer HEAD HEAD`. Together with my recent\n> > (independent) mini-series [1], I claim that Asciidoctor 1.5.5 now\n> > processes the manpages better than AsciiDoc 8.6.10 does.\n>\n> I looked these over, both source and rendered output (both with asciidoc\n> and with asciidoctor 2.0.10), and they all look good to me.\n\nThanks.\n\n> I think the delimited literal blocks are _slightly_ less pretty than the\n> indented ones, but this is the solution we've been using for cross-tool\n> compatibility (and I think it's intentional in asciidoctor to deprecate\n> the indented blocks, because there are just too many corner cases). The\n> delimited ones are also easier to write correctly.\n\nAgreed on all of this.\n\n> > Patch 7/7 has an element of black magic to it. I wouldn't be too\n> > surprised if I've managed to appease my particular versions of these\n> > tools while not fixing -- or maybe even breaking? -- some other versions\n> > [that people actually use]. That's where I think a quick test would be\n> > the most valuable.\n>\n> I can confirm that asciidoctor 2.0.10 has the same bogus output there\n> before your patches, and that 7/7 fixes it.\n\nCool. Thanks for testing it.\n\nMartin\n"}]}