A few Asciidoctor-fixes
cover A few Asciidoctor-fixes
I have (ab)used doc-diff to try to find instances where Asciidoctor and Asciidoc render our documentation differently. (See [1] for details on the hack.) This series fixes the differences that somehow stood out in the diff. Many smaller differences remain.
With each patch, I am giving one or a few URLs which show the current Asciidoctor rendering at git-scm.com.
With Asciidoc, doc-diff origin/master HEAD reports that there is no difference.
[1] https://public-inbox.org/git/CAN0heSob+Ac4BvM-vuKvPZKxrTW53-d91a55NX5kC7ZyNXntWQ@mail.gmail.com/
Martin Ågren (4):
git-column.txt: fix section header
git-init.txt: do not nest open blocks rev-list-options.txt: do not nest open blocks git-status.txt: render tables correctly under Asciidoctor
Documentation/git-column.txt | 2 +- Documentation/git-init.txt | 4 - Documentation/git-status.txt | 162 +++++++++++++++-------------- Documentation/rev-list-options.txt | 4 - 4 files changed, 86 insertions(+), 86 deletions(-)
Signature · 1 line
2.20.1
PATCH 1/4 git-column.txt: fix section header
We have too few dashes under "Examples", which causes Asciidoctor to not pick it up as a section header, but to instead just render the dashes literally. This also seems to confuse Asciidoctor about dashes in general around here. It misinterprets the listing blocks in this section, again rendering the dashes literally.
Make sure we have as many dashes as we have characters in "Examples". This fixes the section-issue and, somehow, makes the listing blocks render correctly.
Asciidoc renders identically before and after this patch, both man-page and html.
---
See https://git-scm.com/docs/git-column
Documentation/git-column.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/git-column.txt +1 -1
@@ -47,7 +47,7 @@ OPTIONS The number of spaces between columns. One space by default. EXAMPLES ------- +-------- Format data by columns: ------------
Signature · 1 line
2.20.1
PATCH 2/4 git-init.txt: do not nest open blocks
In reply to Martin ÅgrenIt appears we try to nest open blocks, but that does not work well with Asciidoctor, which fails to indent the inner block. This causes the inner block to be set as if it had nothing to do with --shared. Drop the outer one. Asciidoc renders identically before and after this patch, both man-page and html.
---
See https://git-scm.com/docs/git-init#git-init---sharedfalsetrueumaskgroupallworldeverybody0xxx
Documentation/git-init.txt | 4 ---- 1 file changed, 4 deletions(-)
Documentation/git-init.txt +0 -4
@@ -38,8 +38,6 @@ the repository to another place if --separate-git-dir is given). OPTIONS ------- --- - -q:: --quiet::
@@ -111,8 +109,6 @@ into it. If you provide a 'directory', the command is run inside it. If this directory does not exist, it will be created. --- - TEMPLATE DIRECTORY ------------------
Signature · 1 line
2.20.1
PATCH 3/4 rev-list-options.txt: do not nest open blocks
In reply to Martin ÅgrenSimilar to the previous commit, it appears we try to nest open blocks, which does not work well with Asciidoctor. Drop the outer one. That fixes the indentation similar to the previous patch, and makes us stop rendering a literal '+' before "Under --pretty=oneline ...". Asciidoc renders identically before and after this patch, both man-page and html.
---
See https://git-scm.com/docs/git-log#git-log--g and
https://git-scm.com/docs/git-rev-list#git-rev-list--g . The indentation doesn't look too bad, but the "+ Under" is clearly wrong.
Documentation/rev-list-options.txt | 4 ---- 1 file changed, 4 deletions(-)
Documentation/rev-list-options.txt +0 -4
@@ -13,8 +13,6 @@ has a line that matches `<pattern>`), unless otherwise noted. Note that these are applied before commit ordering and formatting options, such as `--reverse`. --- - -<number>:: -n <number>:: --max-count=<number>::
@@ -308,8 +306,6 @@ ifdef::git-rev-list[] `<header>` text will be printed with each progress update. endif::git-rev-list[] --- - History Simplification ~~~~~~~~~~~~~~~~~~~~~~
Signature · 1 line
2.20.1
PATCH 4/4 git-status.txt: render tables correctly under Asciidoctor
In reply to Martin ÅgrenAsciidoctor removes the indentation of each line in these tables, so the last lines of each table have a completely broken alignment.
Similar to 379805051d ("Documentation: render revisions correctly under Asciidoctor", 2018-05-06), use an explicit literal block to indicate that we want to keep the leading whitespace in the tables.
Because this gives us some extra indentation, we can remove the one that we have been carrying explicitly. That is, drop the first four spaces of indentation on each line. With Asciidoc (8.6.10), this results in identical rendering before and after this commit, both for git-status.1 and git-status.html.
---
See https://git-scm.com/docs/git-status#_short_format ,
https://git-scm.com/docs/git-status#_branch_headers and
https://git-scm.com/docs/git-status#_changed_tracked_entries .
Documentation/git-status.txt | 162 ++++++++++++++++++----------------- 1 file changed, 85 insertions(+), 77 deletions(-)
Documentation/git-status.txt +85 -77
@@ -197,31 +197,33 @@ codes can be interpreted as follows: Ignored files are not listed, unless `--ignored` option is in effect, in which case `XY` are `!!`. - X Y Meaning - ------------------------------------------------- - [AMD] not updated - M [ MD] updated in index - A [ MD] added to index - D deleted from index - R [ MD] renamed in index - C [ MD] copied in index - [MARC] index and work tree matches - [ MARC] M work tree changed since index - [ MARC] D deleted in work tree - [ D] R renamed in work tree - [ D] C copied in work tree - ------------------------------------------------- - D D unmerged, both deleted - A U unmerged, added by us - U D unmerged, deleted by them - U A unmerged, added by them - D U unmerged, deleted by us - A A unmerged, both added - U U unmerged, both modified - ------------------------------------------------- - ? ? untracked - ! ! ignored - ------------------------------------------------- +.... +X Y Meaning +------------------------------------------------- + [AMD] not updated +M [ MD] updated in index +A [ MD] added to index +D deleted from index +R [ MD] renamed in index +C [ MD] copied in index +[MARC] index and work tree matches +[ MARC] M work tree changed since index +[ MARC] D deleted in work tree +[ D] R renamed in work tree +[ D] C copied in work tree +------------------------------------------------- +D D unmerged, both deleted +A U unmerged, added by us +U D unmerged, deleted by them +U A unmerged, added by them +D U unmerged, deleted by us +A A unmerged, both added +U U unmerged, both modified +------------------------------------------------- +? ? untracked +! ! ignored +------------------------------------------------- +.... Submodules have more state and instead report M the submodule has a different HEAD than
@@ -281,14 +283,16 @@ don't recognize. If `--branch` is given, a series of header lines are printed with information about the current branch. - Line Notes - ------------------------------------------------------------ - # branch.oid <commit> | (initial) Current commit. - # branch.head <branch> | (detached) Current branch. - # branch.upstream <upstream_branch> If upstream is set. - # branch.ab +<ahead> -<behind> If upstream is set and - the commit is present. - ------------------------------------------------------------ +.... +Line Notes +------------------------------------------------------------ +# branch.oid <commit> | (initial) Current commit. +# branch.head <branch> | (detached) Current branch. +# branch.upstream <upstream_branch> If upstream is set. +# branch.ab +<ahead> -<behind> If upstream is set and + the commit is present. +------------------------------------------------------------ +.... ### Changed Tracked Entries
@@ -306,56 +310,60 @@ Renamed or copied entries have the following format: 2 <XY> <sub> <mH> <mI> <mW> <hH> <hI> <X><score> <path><sep><origPath> - Field Meaning - -------------------------------------------------------- - <XY> A 2 character field containing the staged and - unstaged XY values described in the short format, - with unchanged indicated by a "." rather than - a space. - <sub> A 4 character field describing the submodule state. - "N..." when the entry is not a submodule. - "S<c><m><u>" when the entry is a submodule. - <c> is "C" if the commit changed; otherwise ".". - <m> is "M" if it has tracked changes; otherwise ".". - <u> is "U" if there are untracked changes; otherwise ".". - <mH> The octal file mode in HEAD. - <mI> The octal file mode in the index. - <mW> The octal file mode in the worktree. - <hH> The object name in HEAD. - <hI> The object name in the index. - <X><score> The rename or copy score (denoting the percentage - of similarity between the source and target of the - move or copy). For example "R100" or "C75". - <path> The pathname. In a renamed/copied entry, this - is the target path. - <sep> When the `-z` option is used, the 2 pathnames are separated - with a NUL (ASCII 0x00) byte; otherwise, a tab (ASCII 0x09) - byte separates them. - <origPath> The pathname in the commit at HEAD or in the index. - This is only present in a renamed/copied entry, and - tells where the renamed/copied contents came from. - -------------------------------------------------------- +.... +Field Meaning +-------------------------------------------------------- +<XY> A 2 character field containing the staged and + unstaged XY values described in the short format, + with unchanged indicated by a "." rather than + a space. +<sub> A 4 character field describing the submodule state. + "N..." when the entry is not a submodule. + "S<c><m><u>" when the entry is a submodule. + <c> is "C" if the commit changed; otherwise ".". + <m> is "M" if it has tracked changes; otherwise ".". + <u> is "U" if there are untracked changes; otherwise ".". +<mH> The octal file mode in HEAD. +<mI> The octal file mode in the index. +<mW> The octal file mode in the worktree. +<hH> The object name in HEAD. +<hI> The object name in the index. +<X><score> The rename or copy score (denoting the percentage + of similarity between the source and target of the + move or copy). For example "R100" or "C75". +<path> The pathname. In a renamed/copied entry, this + is the target path. +<sep> When the `-z` option is used, the 2 pathnames are separated + with a NUL (ASCII 0x00) byte; otherwise, a tab (ASCII 0x09) + byte separates them. +<origPath> The pathname in the commit at HEAD or in the index. + This is only present in a renamed/copied entry, and + tells where the renamed/copied contents came from. +-------------------------------------------------------- +.... Unmerged entries have the following format; the first character is a "u" to distinguish from ordinary changed entries. u <xy> <sub> <m1> <m2> <m3> <mW> <h1> <h2> <h3> <path> - Field Meaning - -------------------------------------------------------- - <XY> A 2 character field describing the conflict type - as described in the short format. - <sub> A 4 character field describing the submodule state - as described above. - <m1> The octal file mode in stage 1. - <m2> The octal file mode in stage 2. - <m3> The octal file mode in stage 3. - <mW> The octal file mode in the worktree. - <h1> The object name in stage 1. - <h2> The object name in stage 2. - <h3> The object name in stage 3. - <path> The pathname. - -------------------------------------------------------- +.... +Field Meaning +-------------------------------------------------------- +<XY> A 2 character field describing the conflict type + as described in the short format. +<sub> A 4 character field describing the submodule state + as described above. +<m1> The octal file mode in stage 1. +<m2> The octal file mode in stage 2. +<m3> The octal file mode in stage 3. +<mW> The octal file mode in the worktree. +<h1> The object name in stage 1. +<h2> The object name in stage 2. +<h3> The object name in stage 3. +<path> The pathname. +-------------------------------------------------------- +.... ### Other Items
Signature · 1 line
2.20.1
Quoted 4 lines · Martin Ågren
I have (ab)used doc-diff to try to find instances where Asciidoctor and Asciidoc render our documentation differently. (See [1] for details on the hack.) This series fixes the differences that somehow stood out in the diff. Many smaller differences remain.
I think the relevant bits from [1] are:
* Use make --always-make ... install-man in doc-diff.
* ./doc-diff -f HEAD HEAD # note -f
* Add empty commit and tweak config.mak
* ./doc-diff HEAD^ HEAD # note no -f
To make this easier, it would make sense to me to:
- teach doc-diff a flag for marking one or both of the endpoints to be built with asciidoctor versus asciidoc
- mark the asciidoc/asciidoctor in the directory name. That name serves as a cache key for avoiding re-doing the work, you should be able to just:
./doc-diff --asciidoctor HEAD HEAD
and actually build and compare what you want.
- it sounds from "make --always-make" that our Makefile does not properly rebuild when we switch from asciidoc to asciidoctor. That might be nice to fix with a mechanism similar to the GIT-BUILD-FLAGS we use in the top-level Makefile.
-Peff
Re: [PATCH 1/4] git-column.txt: fix section header
In reply to Martin ÅgrenQuoted 9 lines · Martin Ågren
We have too few dashes under "Examples", which causes Asciidoctor to not pick it up as a section header, but to instead just render the dashes literally. This also seems to confuse Asciidoctor about dashes in general around here. It misinterprets the listing blocks in this section, again rendering the dashes literally.
Make sure we have as many dashes as we have characters in "Examples". This fixes the section-issue and, somehow, makes the listing blocks render correctly.
Yeah, the mis-matched title-and-dashes thing has bitten us several times. I think this one just post-dates the last round of fixing.
The "somehow" here is that the mismatched dashes appear to be the start of a code listing block, making the whole example section into one big listing (which isn't properly closed, generating a warning).
And that's why in the context:
Quoted 6 lines
EXAMPLES
-------
+--------Format data by columns:
------------
We _don't_ need to match up the dashes for "Format data...". That is meant to be a listing block (and arguably should use a shorter string of dashes to make that intent more obvious).
-Peff
Re: [PATCH 2/4] git-init.txt: do not nest open blocks
In reply to Martin ÅgrenQuoted 5 lines · Martin Ågren
It appears we try to nest open blocks, but that does not work well with Asciidoctor, which fails to indent the inner block. This causes the inner block to be set as if it had nothing to do with
--shared. Drop the outer one. Asciidoc renders identically before and after this patch, both man-page and html.
Hrm. I'm not sure how we're supposed to have a block-within-a-block in asciidoctor, and that may be something we want to fix in the long run. But I agree this block around all of the options is not doing anything useful, and the simplest solution here is just to get rid of it.
It dates all the way back to d145144c3b (Document git-init, 2007-01-11), so perhaps it did something useful in an ancient version of asciidoc.
-Peff
Re: [PATCH 3/4] rev-list-options.txt: do not nest open blocks
In reply to Martin ÅgrenQuoted 5 lines · Martin Ågren
Similar to the previous commit, it appears we try to nest open blocks, which does not work well with Asciidoctor. Drop the outer one. That fixes the indentation similar to the previous patch, and makes us stop rendering a literal '+' before "Under --pretty=oneline ...". Asciidoc renders identically before and after this patch, both man-page and html.
Makes sense. Arguably this could be squashed into the previous one, since the rationale is completely the same (but I'm OK with it either way).
-Peff
Re: [PATCH 4/4] git-status.txt: render tables correctly under Asciidoctor
In reply to Martin ÅgrenQuoted 7 lines · Martin Ågren
Asciidoctor removes the indentation of each line in these tables, so the last lines of each table have a completely broken alignment.
Similar to
379805051d("Documentation: render revisions correctly under Asciidoctor", 2018-05-06), use an explicit literal block to indicate that we want to keep the leading whitespace in the tables.
Quoted 5 lines
Because this gives us some extra indentation, we can remove the one that we have been carrying explicitly. That is, drop the first four spaces of indentation on each line. With Asciidoc (8.6.10), this results in identical rendering before and after this commit, both for git-status.1 and git-status.html.
Yep, this makes sense based on the prior art you cited.
The whole series looks good to me. Thanks for working on it!
-Peff
Re: [PATCH 1/4] git-column.txt: fix section header
In reply to Jeff KingQuoted 9 lines · Jeff King
Quoted 6 lines · Martin Ågren
We have too few dashes under "Examples", which causes Asciidoctor to not pick it up as a section header, but to instead just render the dashes literally. This also seems to confuse Asciidoctor about dashes in general around here. It misinterprets the listing blocks in this section, again rendering the dashes literally.
Quoted 7 lines
Quoted 3 lines
Make sure we have as many dashes as we have characters in "Examples". This fixes the section-issue and, somehow, makes the listing blocks render correctly.
The "somehow" here is that the mismatched dashes appear to be the start of a code listing block, making the whole example section into one big listing (which isn't properly closed, generating a warning).
Of course. Thanks for pointing it out. I now realize that when I wrote "render the dashes literally", I was wrong.
This should be improved in v2.
Martin
v2 cover A few Asciidoctor-fixes
In reply to Jeff KingThis series addresses a few instances where our documentation renders badly in Asciidoctor, compared to Asciidoc. The changes made are exactly the same as in v1 [1], but the first commit message is corrected, and the two patches 2/4 and 3/4 are now just a single patch 2/3.
Thanks Peff for your comments on v1.
[1] https://public-inbox.org/git/[email protected]/
Martin Ågren (3):
git-column.txt: fix section header
Documentation: do not nest open blocks git-status.txt: render tables correctly under Asciidoctor
Documentation/git-column.txt | 2 +- Documentation/git-init.txt | 4 - Documentation/git-status.txt | 162 +++++++++++++++-------------- Documentation/rev-list-options.txt | 4 - 4 files changed, 86 insertions(+), 86 deletions(-)
Signature · 1 line
2.20.1
PATCH v2 1/3 git-column.txt: fix section header
We have too few dashes under "Examples", which causes Asciidoctor to not pick it up as a section header. Instead, it thinks we are starting a code listing block, which ends up containing the remainder of the document. The result is quite ugly.
Make sure we have as many dashes as we have characters in "Examples". Asciidoc renders identically before and after this patch, both man-page and html.
--- Documentation/git-column.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/git-column.txt +1 -1
@@ -47,7 +47,7 @@ OPTIONS The number of spaces between columns. One space by default. EXAMPLES ------- +-------- Format data by columns: ------------
Signature · 1 line
2.20.1
PATCH v2 2/3 Documentation: do not nest open blocks
In reply to Martin ÅgrenIt appears we try to nest open blocks, but that does not work well with Asciidoctor, which fails to indent the inner blocks. As a result, they do not visually seem to relate (as much) to the preceding paragraph as they should. Drop the outer blocks to fix the rendering of the inner ones. Asciidoc renders identically before and after this patch, both man-pages and html.
This also makes Asciidoctor stop rendering a literal '+' before "Under --pretty=oneline ..." in the manuals for git-log and git-rev-list.
--- Documentation/git-init.txt | 4 ---- Documentation/rev-list-options.txt | 4 ---- 2 files changed, 8 deletions(-)
Documentation/git-init.txt +0 -4
@@ -38,8 +38,6 @@ the repository to another place if --separate-git-dir is given). OPTIONS ------- --- - -q:: --quiet::
@@ -111,8 +109,6 @@ into it. If you provide a 'directory', the command is run inside it. If this directory does not exist, it will be created. --- - TEMPLATE DIRECTORY ------------------
Documentation/rev-list-options.txt +0 -4
@@ -13,8 +13,6 @@ has a line that matches `<pattern>`), unless otherwise noted. Note that these are applied before commit ordering and formatting options, such as `--reverse`. --- - -<number>:: -n <number>:: --max-count=<number>::
@@ -308,8 +306,6 @@ ifdef::git-rev-list[] `<header>` text will be printed with each progress update. endif::git-rev-list[] --- - History Simplification ~~~~~~~~~~~~~~~~~~~~~~
Signature · 1 line
2.20.1
PATCH v2 3/3 git-status.txt: render tables correctly under Asciidoctor
In reply to Martin ÅgrenAsciidoctor removes the indentation of each line in these tables, so the last lines of each table have a completely broken alignment.
Similar to 379805051d ("Documentation: render revisions correctly under Asciidoctor", 2018-05-06), use an explicit literal block to indicate that we want to keep the leading whitespace in the tables.
Because this gives us some extra indentation, we can remove the one that we have been carrying explicitly. That is, drop the first four spaces of indentation on each line. With Asciidoc (8.6.10), this results in identical rendering before and after this commit, both for git-status.1 and git-status.html.
--- Documentation/git-status.txt | 162 ++++++++++++++++++----------------- 1 file changed, 85 insertions(+), 77 deletions(-)
Documentation/git-status.txt +85 -77
@@ -197,31 +197,33 @@ codes can be interpreted as follows: Ignored files are not listed, unless `--ignored` option is in effect, in which case `XY` are `!!`. - X Y Meaning - ------------------------------------------------- - [AMD] not updated - M [ MD] updated in index - A [ MD] added to index - D deleted from index - R [ MD] renamed in index - C [ MD] copied in index - [MARC] index and work tree matches - [ MARC] M work tree changed since index - [ MARC] D deleted in work tree - [ D] R renamed in work tree - [ D] C copied in work tree - ------------------------------------------------- - D D unmerged, both deleted - A U unmerged, added by us - U D unmerged, deleted by them - U A unmerged, added by them - D U unmerged, deleted by us - A A unmerged, both added - U U unmerged, both modified - ------------------------------------------------- - ? ? untracked - ! ! ignored - ------------------------------------------------- +.... +X Y Meaning +------------------------------------------------- + [AMD] not updated +M [ MD] updated in index +A [ MD] added to index +D deleted from index +R [ MD] renamed in index +C [ MD] copied in index +[MARC] index and work tree matches +[ MARC] M work tree changed since index +[ MARC] D deleted in work tree +[ D] R renamed in work tree +[ D] C copied in work tree +------------------------------------------------- +D D unmerged, both deleted +A U unmerged, added by us +U D unmerged, deleted by them +U A unmerged, added by them +D U unmerged, deleted by us +A A unmerged, both added +U U unmerged, both modified +------------------------------------------------- +? ? untracked +! ! ignored +------------------------------------------------- +.... Submodules have more state and instead report M the submodule has a different HEAD than
@@ -281,14 +283,16 @@ don't recognize. If `--branch` is given, a series of header lines are printed with information about the current branch. - Line Notes - ------------------------------------------------------------ - # branch.oid <commit> | (initial) Current commit. - # branch.head <branch> | (detached) Current branch. - # branch.upstream <upstream_branch> If upstream is set. - # branch.ab +<ahead> -<behind> If upstream is set and - the commit is present. - ------------------------------------------------------------ +.... +Line Notes +------------------------------------------------------------ +# branch.oid <commit> | (initial) Current commit. +# branch.head <branch> | (detached) Current branch. +# branch.upstream <upstream_branch> If upstream is set. +# branch.ab +<ahead> -<behind> If upstream is set and + the commit is present. +------------------------------------------------------------ +.... ### Changed Tracked Entries
@@ -306,56 +310,60 @@ Renamed or copied entries have the following format: 2 <XY> <sub> <mH> <mI> <mW> <hH> <hI> <X><score> <path><sep><origPath> - Field Meaning - -------------------------------------------------------- - <XY> A 2 character field containing the staged and - unstaged XY values described in the short format, - with unchanged indicated by a "." rather than - a space. - <sub> A 4 character field describing the submodule state. - "N..." when the entry is not a submodule. - "S<c><m><u>" when the entry is a submodule. - <c> is "C" if the commit changed; otherwise ".". - <m> is "M" if it has tracked changes; otherwise ".". - <u> is "U" if there are untracked changes; otherwise ".". - <mH> The octal file mode in HEAD. - <mI> The octal file mode in the index. - <mW> The octal file mode in the worktree. - <hH> The object name in HEAD. - <hI> The object name in the index. - <X><score> The rename or copy score (denoting the percentage - of similarity between the source and target of the - move or copy). For example "R100" or "C75". - <path> The pathname. In a renamed/copied entry, this - is the target path. - <sep> When the `-z` option is used, the 2 pathnames are separated - with a NUL (ASCII 0x00) byte; otherwise, a tab (ASCII 0x09) - byte separates them. - <origPath> The pathname in the commit at HEAD or in the index. - This is only present in a renamed/copied entry, and - tells where the renamed/copied contents came from. - -------------------------------------------------------- +.... +Field Meaning +-------------------------------------------------------- +<XY> A 2 character field containing the staged and + unstaged XY values described in the short format, + with unchanged indicated by a "." rather than + a space. +<sub> A 4 character field describing the submodule state. + "N..." when the entry is not a submodule. + "S<c><m><u>" when the entry is a submodule. + <c> is "C" if the commit changed; otherwise ".". + <m> is "M" if it has tracked changes; otherwise ".". + <u> is "U" if there are untracked changes; otherwise ".". +<mH> The octal file mode in HEAD. +<mI> The octal file mode in the index. +<mW> The octal file mode in the worktree. +<hH> The object name in HEAD. +<hI> The object name in the index. +<X><score> The rename or copy score (denoting the percentage + of similarity between the source and target of the + move or copy). For example "R100" or "C75". +<path> The pathname. In a renamed/copied entry, this + is the target path. +<sep> When the `-z` option is used, the 2 pathnames are separated + with a NUL (ASCII 0x00) byte; otherwise, a tab (ASCII 0x09) + byte separates them. +<origPath> The pathname in the commit at HEAD or in the index. + This is only present in a renamed/copied entry, and + tells where the renamed/copied contents came from. +-------------------------------------------------------- +.... Unmerged entries have the following format; the first character is a "u" to distinguish from ordinary changed entries. u <xy> <sub> <m1> <m2> <m3> <mW> <h1> <h2> <h3> <path> - Field Meaning - -------------------------------------------------------- - <XY> A 2 character field describing the conflict type - as described in the short format. - <sub> A 4 character field describing the submodule state - as described above. - <m1> The octal file mode in stage 1. - <m2> The octal file mode in stage 2. - <m3> The octal file mode in stage 3. - <mW> The octal file mode in the worktree. - <h1> The object name in stage 1. - <h2> The object name in stage 2. - <h3> The object name in stage 3. - <path> The pathname. - -------------------------------------------------------- +.... +Field Meaning +-------------------------------------------------------- +<XY> A 2 character field describing the conflict type + as described in the short format. +<sub> A 4 character field describing the submodule state + as described above. +<m1> The octal file mode in stage 1. +<m2> The octal file mode in stage 2. +<m3> The octal file mode in stage 3. +<mW> The octal file mode in the worktree. +<h1> The object name in stage 1. +<h2> The object name in stage 2. +<h3> The object name in stage 3. +<path> The pathname. +-------------------------------------------------------- +.... ### Other Items
Signature · 1 line
2.20.1
Quoted 8 lines · Jeff King
On Sat, Dec 15, 2018 at 12:27:38PM +0100, Martin Ågren wrote:
I think the relevant bits from [1] are:* Use
make --always-make ... install-manin doc-diff.
* ./doc-diff -f HEAD HEAD # note -f
* Add empty commit and tweak config.mak
* ./doc-diff HEAD^ HEAD # note no -f
Yes, that's it.
Quoted 9 lines
To make this easier, it would make sense to me to:
- teach doc-diff a flag for marking one or both of the endpoints to be built with asciidoctor versus asciidoc
- mark the asciidoc/asciidoctor in the directory name. That name serves as a cache key for avoiding re-doing the work, you should be able to just:
Quoted 6 lines
./doc-diff --asciidoctor HEAD HEAD
and actually build and compare what you want.
- it sounds from "make --always-make" that our
Makefiledoes not properly rebuild when we switch from asciidoc to asciidoctor. That
Exactly.
Quoted 2 lines
might be nice to fix with a mechanism similar to the GIT-BUILD-FLAGS we use in the top-level
Makefile.
Agreed on all three points. The last one would supposedly be useful on its own, beyond this doc-diff motivation.
Your list seems complete to me in terms of "how could we teach doc-diff to diff asciidoctor vs asciidoc?". For the resulting diff to actually be useful ;-) there are two more outstanding issues that I see:
- Headers and footers. Asciidoc (driven by doc-diff) uses some boilerplate values which avoid timestamps and the like. Asciidoctor partly uses different values, partly interprets the ones given differently.
- Asciidoctor introduces a space after linkgit:foo , e.g., before punctuation.
Both of these are problems in their own right, so they probably shouldn't be suppressed in the resulting diff. But as long as these issues remain, they produce a lot of noise which might hide more interesting (IMHO) differences.
Martin
Quoted 9 lines · Martin Ågren
Your list seems complete to me in terms of "how could we teach doc-diff to diff asciidoctor vs asciidoc?". For the resulting diff to actually be useful ;-) there are two more outstanding issues that I see:
- Headers and footers. Asciidoc (driven by doc-diff) uses some boilerplate values which avoid timestamps and the like. Asciidoctor partly uses different values, partly interprets the ones given differently.
Quoted 7 lines
- Asciidoctor introduces a space after linkgit:foo , e.g., before punctuation.
Both of these are problems in their own right, so they probably shouldn't be suppressed in the resulting diff. But as long as these issues remain, they produce a lot of noise which might hide more interesting (IMHO) differences.
If there are a small number of distinct problems (that each have many instances), I'm not opposed to having a mode to suppress them in the resulting diff, so we can see the other problems more clearly. Of course, just fixing them is even better. ;)
The first one sounds like it may be a candidate for suppressing (i.e., it's not necessarily an actual problem).
-Peff
Quoted 6 lines · Martin Ågren
This series addresses a few instances where our documentation renders badly in Asciidoctor, compared to Asciidoc. The changes made are exactly the same as in v1 [1], but the first commit message is corrected, and the two patches 2/4 and 3/4 are now just a single patch 2/3.
Thanks Peff for your comments on v1.
Thanks, this all looks quite sensible to me (I didn't hack up doc-diff as you did, but I did eyeball the before/after html from asciidoctor).
-Peff