{"thread":{"id":"49908","subject":"Broken alignment in git-reset docs","startedAt":"2018-11-28T11:40:59Z","lastAt":"2018-11-28T20:37:33Z","messageCount":7,"participants":["Paweł Samoraj","Martin Ågren","Ævar Arnfjörð Bjarmason"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"364215","messageId":"CAJjcwZ-bjCVbsXhyRtQHsH9U+yytbRvq07j4hTOnuD-g0XXL0w@mail.gmail.com","threadId":"49908","inReplyTo":null,"subject":"Broken alignment in git-reset docs","fromName":"Paweł Samoraj","fromEmail":"samoraj.pawel@gmail.com","sentAt":"2018-11-28T11:40:44Z","receivedAt":"2018-11-28T11:40:59Z","isPatch":false,"sender":{"key":"samoraj.pawel@gmail.com","avatar":null},"body":"Hi!\nThe git-reset documentation page section which is accessible via URL\nhttps://git-scm.com/docs/git-reset#_discussion is not looking good.\n\nASCII tables should look like this:\n\n      working index HEAD target         working index HEAD\n      ----------------------------------------------------\n       A       B     C    D     --soft      A       B     D\n                                     --mixed   A       D     D\n                                     --hard     D       D     D\n                                     --merge (disallowed)\n                                     --keep  (disallowed)\n\nbut are like this:\n\n  working index HEAD target         working index HEAD\n  ----------------------------------------------------\n   A       B     C    D     --soft   A       B     D\n--mixed  A       D     D\n--hard   D       D     D\n--merge (disallowed)\n--keep  (disallowed)\n\n\nThe web archive has got a snapshot from 2014-06-28 when it was ok\n(https://web.archive.org/web/20140628170155/http://git-scm.com/docs/git-reset).\n"},{"id":"364216","messageId":"CAN0heSph-a08AzsihqqxfC=nqmUQLsqx-rKGULXQ-gmT4+c10w@mail.gmail.com","threadId":"49908","inReplyTo":"CAJjcwZ-bjCVbsXhyRtQHsH9U+yytbRvq07j4hTOnuD-g0XXL0w@mail.gmail.com","subject":"Re: Broken alignment in git-reset docs","fromName":"Martin Ågren","fromEmail":"martin.agren@gmail.com","sentAt":"2018-11-28T12:02:47Z","receivedAt":"2018-11-28T12:03:04Z","isPatch":false,"sender":{"key":"martin.agren@gmail.com","avatar":null},"body":"On Wed, 28 Nov 2018 at 12:42, Paweł Samoraj <samoraj.pawel@gmail.com> wrote:\n>\n> Hi!\n> The git-reset documentation page section which is accessible via URL\n> https://git-scm.com/docs/git-reset#_discussion is not looking good.\n>\n[snip]\n>\n> The web archive has got a snapshot from 2014-06-28 when it was ok\n> (https://web.archive.org/web/20140628170155/http://git-scm.com/docs/git-reset).\n\nHi Paweł\n\nThanks for the report. The sources have not changed since 2010, so this\nis most likely because something in the build has changed. It's probably\nthat git-scm.com has switched to using Asciidoctor (as opposed to\nAsciidoc). The correct fix could be something like 379805051d\n(\"Documentation: render revisions correctly under Asciidoctor\",\n2018-05-06).\n\nDo you feel like attempting a patch against git.git? The hard part of\nthat is probably to get all the build dependencies in place, in\nparticular to be able to test with both Asciidoc and Asciidoctor. See\nUSE_ASCIIDOCTOR in Documentation/Makefile. If you're not up for it, no\nproblem, I should be able to get to this later today.\n\nThanks again for the report.\nMartin\n"},{"id":"364234","messageId":"cover.1543429054.git.martin.agren@gmail.com","threadId":"49908","inReplyTo":"CAN0heSph-a08AzsihqqxfC=nqmUQLsqx-rKGULXQ-gmT4+c10w@mail.gmail.com","subject":"[PATCH 0/2] Re: Broken alignment in git-reset docs","fromName":"Martin Ågren","fromEmail":"martin.agren@gmail.com","sentAt":"2018-11-28T19:02:08Z","receivedAt":"2018-11-28T19:02:33Z","isPatch":true,"sender":{"key":"martin.agren@gmail.com","avatar":null},"body":"On Wed, 28 Nov 2018 at 13:02, Martin Ågren <martin.agren@gmail.com> wrote:\n>\n> On Wed, 28 Nov 2018 at 12:42, Paweł Samoraj <samoraj.pawel@gmail.com> wrote:\n> >\n> > The git-reset documentation page section which is accessible via URL\n> > https://git-scm.com/docs/git-reset#_discussion is not looking good.\n>\n> [...] The correct fix could be something like 379805051d\n> (\"Documentation: render revisions correctly under Asciidoctor\",\n> 2018-05-06).\n\nTurns out it probably is, so here's a proposed fix, followed by a patch\nto typeset more of this document in monospace. That should also make\nthings prettier, but not in such a dramatic way as the first patch.\n\nThis is obviously not 2.20-material. About where to queue this, I had\nexpected this to depend on 743e63f3ed (\"Documentation: use 8-space tabs\nwith Asciidoctor\", 2018-05-06) just like 379805051d does for proper\nrendering, but from my testing, somehow it doesn't.\n\nPaweł, I'm hoping this fix should be in v2.21 in a few months and then\neventually trickle down to git-scm. Thanks again for reporting this.\n\nMartin Ågren (2):\n  git-reset.txt: render tables correctly under Asciidoctor\n  git-reset.txt: render literal examples as monospace\n\n Documentation/git-reset.txt | 277 +++++++++++++++++++-----------------\n 1 file changed, 147 insertions(+), 130 deletions(-)\n\n-- \n2.20.0.rc1.8.g46351a2c6f\n\n"},{"id":"364235","messageId":"1596a9ff9fa6849f53590de1b15eb18ee6b41e4d.1543429054.git.martin.agren@gmail.com","threadId":"49908","inReplyTo":"cover.1543429054.git.martin.agren@gmail.com","subject":"[PATCH 1/2] git-reset.txt: render tables correctly under Asciidoctor","fromName":"Martin Ågren","fromEmail":"martin.agren@gmail.com","sentAt":"2018-11-28T19:02:09Z","receivedAt":"2018-11-28T19:02:41Z","isPatch":true,"sender":{"key":"martin.agren@gmail.com","avatar":null},"body":"Asciidoctor removes the indentation of each line in these tables, so the\nlast lines of each table have a completely broken alignment.\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.\n\nBecause this gives us some extra indentation, we can remove the one that\nwe have been carrying explicitly. That is, drop the first six spaces of\nindentation on each line. With Asciidoc (8.6.10), this results in\nidentical rendering before and after this commit, both for git-reset.1\nand git-reset.html.\n\nReported-by: Paweł Samoraj <samoraj.pawel@gmail.com>\nSigned-off-by: Martin Ågren <martin.agren@gmail.com>\n---\n Documentation/git-reset.txt | 140 ++++++++++++++++++++----------------\n 1 file changed, 78 insertions(+), 62 deletions(-)\n\ndiff --git a/Documentation/git-reset.txt b/Documentation/git-reset.txt\nindex 2dac95c71a..7c925e3a29 100644\n--- a/Documentation/git-reset.txt\n+++ b/Documentation/git-reset.txt\n@@ -365,53 +365,65 @@ index in state B.  It resets (i.e. moves) the HEAD (i.e. the tip of\n the current branch, if you are on one) to \"target\" (which has the file\n in state D).\n \n-      working index HEAD target         working index HEAD\n-      ----------------------------------------------------\n-       A       B     C    D     --soft   A       B     D\n-\t\t\t\t--mixed  A       D     D\n-\t\t\t\t--hard   D       D     D\n-\t\t\t\t--merge (disallowed)\n-\t\t\t\t--keep  (disallowed)\n-\n-      working index HEAD target         working index HEAD\n-      ----------------------------------------------------\n-       A       B     C    C     --soft   A       B     C\n-\t\t\t\t--mixed  A       C     C\n-\t\t\t\t--hard   C       C     C\n-\t\t\t\t--merge (disallowed)\n-\t\t\t\t--keep   A       C     C\n-\n-      working index HEAD target         working index HEAD\n-      ----------------------------------------------------\n-       B       B     C    D     --soft   B       B     D\n-\t\t\t\t--mixed  B       D     D\n-\t\t\t\t--hard   D       D     D\n-\t\t\t\t--merge  D       D     D\n-\t\t\t\t--keep  (disallowed)\n-\n-      working index HEAD target         working index HEAD\n-      ----------------------------------------------------\n-       B       B     C    C     --soft   B       B     C\n-\t\t\t\t--mixed  B       C     C\n-\t\t\t\t--hard   C       C     C\n-\t\t\t\t--merge  C       C     C\n-\t\t\t\t--keep   B       C     C\n-\n-      working index HEAD target         working index HEAD\n-      ----------------------------------------------------\n-       B       C     C    D     --soft   B       C     D\n-\t\t\t\t--mixed  B       D     D\n-\t\t\t\t--hard   D       D     D\n-\t\t\t\t--merge (disallowed)\n-\t\t\t\t--keep  (disallowed)\n-\n-      working index HEAD target         working index HEAD\n-      ----------------------------------------------------\n-       B       C     C    C     --soft   B       C     C\n-\t\t\t\t--mixed  B       C     C\n-\t\t\t\t--hard   C       C     C\n-\t\t\t\t--merge  B       C     C\n-\t\t\t\t--keep   B       C     C\n+....\n+working index HEAD target         working index HEAD\n+----------------------------------------------------\n+ A       B     C    D     --soft   A       B     D\n+\t\t\t  --mixed  A       D     D\n+\t\t\t  --hard   D       D     D\n+\t\t\t  --merge (disallowed)\n+\t\t\t  --keep  (disallowed)\n+....\n+\n+....\n+working index HEAD target         working index HEAD\n+----------------------------------------------------\n+ A       B     C    C     --soft   A       B     C\n+\t\t\t  --mixed  A       C     C\n+\t\t\t  --hard   C       C     C\n+\t\t\t  --merge (disallowed)\n+\t\t\t  --keep   A       C     C\n+....\n+\n+....\n+working index HEAD target         working index HEAD\n+----------------------------------------------------\n+ B       B     C    D     --soft   B       B     D\n+\t\t\t  --mixed  B       D     D\n+\t\t\t  --hard   D       D     D\n+\t\t\t  --merge  D       D     D\n+\t\t\t  --keep  (disallowed)\n+....\n+\n+....\n+working index HEAD target         working index HEAD\n+----------------------------------------------------\n+ B       B     C    C     --soft   B       B     C\n+\t\t\t  --mixed  B       C     C\n+\t\t\t  --hard   C       C     C\n+\t\t\t  --merge  C       C     C\n+\t\t\t  --keep   B       C     C\n+....\n+\n+....\n+working index HEAD target         working index HEAD\n+----------------------------------------------------\n+ B       C     C    D     --soft   B       C     D\n+\t\t\t  --mixed  B       D     D\n+\t\t\t  --hard   D       D     D\n+\t\t\t  --merge (disallowed)\n+\t\t\t  --keep  (disallowed)\n+....\n+\n+....\n+working index HEAD target         working index HEAD\n+----------------------------------------------------\n+ B       C     C    C     --soft   B       C     C\n+\t\t\t  --mixed  B       C     C\n+\t\t\t  --hard   C       C     C\n+\t\t\t  --merge  B       C     C\n+\t\t\t  --keep   B       C     C\n+....\n \n \"reset --merge\" is meant to be used when resetting out of a conflicted\n merge. Any mergy operation guarantees that the working tree file that is\n@@ -434,21 +446,25 @@ entries.\n The following tables show what happens when there are unmerged\n entries:\n \n-      working index HEAD target         working index HEAD\n-      ----------------------------------------------------\n-       X       U     A    B     --soft  (disallowed)\n-\t\t\t\t--mixed  X       B     B\n-\t\t\t\t--hard   B       B     B\n-\t\t\t\t--merge  B       B     B\n-\t\t\t\t--keep  (disallowed)\n-\n-      working index HEAD target         working index HEAD\n-      ----------------------------------------------------\n-       X       U     A    A     --soft  (disallowed)\n-\t\t\t\t--mixed  X       A     A\n-\t\t\t\t--hard   A       A     A\n-\t\t\t\t--merge  A       A     A\n-\t\t\t\t--keep  (disallowed)\n+....\n+working index HEAD target         working index HEAD\n+----------------------------------------------------\n+ X       U     A    B     --soft  (disallowed)\n+\t\t\t  --mixed  X       B     B\n+\t\t\t  --hard   B       B     B\n+\t\t\t  --merge  B       B     B\n+\t\t\t  --keep  (disallowed)\n+....\n+\n+....\n+working index HEAD target         working index HEAD\n+----------------------------------------------------\n+ X       U     A    A     --soft  (disallowed)\n+\t\t\t  --mixed  X       A     A\n+\t\t\t  --hard   A       A     A\n+\t\t\t  --merge  A       A     A\n+\t\t\t  --keep  (disallowed)\n+....\n \n X means any state and U means an unmerged index.\n \n-- \n2.20.0.rc1.8.g46351a2c6f\n\n"},{"id":"364236","messageId":"8b7d95c154ea1ea77e798c07d018f939322451d3.1543429054.git.martin.agren@gmail.com","threadId":"49908","inReplyTo":"cover.1543429054.git.martin.agren@gmail.com","subject":"[PATCH 2/2] git-reset.txt: render literal examples as monospace","fromName":"Martin Ågren","fromEmail":"martin.agren@gmail.com","sentAt":"2018-11-28T19:02:10Z","receivedAt":"2018-11-28T19:02:45Z","isPatch":true,"sender":{"key":"martin.agren@gmail.com","avatar":null},"body":"Large parts of this document do not use `backticks` around literal\nexamples such as branch names (`topic/wip`), git usages, `HEAD` and\n`<commit-ish>` so they render as ordinary text. Fix that.\n\nSigned-off-by: Martin Ågren <martin.agren@gmail.com>\n---\n Documentation/git-reset.txt | 131 ++++++++++++++++++------------------\n 1 file changed, 66 insertions(+), 65 deletions(-)\n\ndiff --git a/Documentation/git-reset.txt b/Documentation/git-reset.txt\nindex 7c925e3a29..9f69ae8b69 100644\n--- a/Documentation/git-reset.txt\n+++ b/Documentation/git-reset.txt\n@@ -14,14 +14,14 @@ SYNOPSIS\n \n DESCRIPTION\n -----------\n-In the first and second form, copy entries from <tree-ish> to the index.\n-In the third form, set the current branch head (HEAD) to <commit>, optionally\n-modifying index and working tree to match.  The <tree-ish>/<commit> defaults\n-to HEAD in all forms.\n+In the first and second form, copy entries from `<tree-ish>` to the index.\n+In the third form, set the current branch head (`HEAD`) to `<commit>`,\n+optionally modifying index and working tree to match.\n+The `<tree-ish>`/`<commit>` defaults to `HEAD` in all forms.\n \n 'git reset' [-q] [<tree-ish>] [--] <paths>...::\n-\tThis form resets the index entries for all <paths> to their\n-\tstate at <tree-ish>.  (It does not affect the working tree or\n+\tThis form resets the index entries for all `<paths>` to their\n+\tstate at `<tree-ish>`.  (It does not affect the working tree or\n \tthe current branch.)\n +\n This means that `git reset <paths>` is the opposite of `git add\n@@ -36,7 +36,7 @@ working tree in one go.\n \n 'git reset' (--patch | -p) [<tree-ish>] [--] [<paths>...]::\n \tInteractively select hunks in the difference between the index\n-\tand <tree-ish> (defaults to HEAD).  The chosen hunks are applied\n+\tand `<tree-ish>` (defaults to `HEAD`).  The chosen hunks are applied\n \tin reverse to the index.\n +\n This means that `git reset -p` is the opposite of `git add -p`, i.e.\n@@ -44,16 +44,16 @@ you can use it to selectively reset hunks. See the ``Interactive Mode''\n section of linkgit:git-add[1] to learn how to operate the `--patch` mode.\n \n 'git reset' [<mode>] [<commit>]::\n-\tThis form resets the current branch head to <commit> and\n-\tpossibly updates the index (resetting it to the tree of <commit>) and\n-\tthe working tree depending on <mode>. If <mode> is omitted,\n-\tdefaults to \"--mixed\". The <mode> must be one of the following:\n+\tThis form resets the current branch head to `<commit>` and\n+\tpossibly updates the index (resetting it to the tree of `<commit>`) and\n+\tthe working tree depending on `<mode>`. If `<mode>` is omitted,\n+\tdefaults to `--mixed`. The `<mode>` must be one of the following:\n +\n --\n --soft::\n \tDoes not touch the index file or the working tree at all (but\n-\tresets the head to <commit>, just like all modes do). This leaves\n-\tall your changed files \"Changes to be committed\", as 'git status'\n+\tresets the head to `<commit>`, just like all modes do). This leaves\n+\tall your changed files \"Changes to be committed\", as `git status`\n \twould put it.\n \n --mixed::\n@@ -66,24 +66,24 @@ linkgit:git-add[1]).\n \n --hard::\n \tResets the index and working tree. Any changes to tracked files in the\n-\tworking tree since <commit> are discarded.\n+\tworking tree since `<commit>` are discarded.\n \n --merge::\n \tResets the index and updates the files in the working tree that are\n-\tdifferent between <commit> and HEAD, but keeps those which are\n+\tdifferent between `<commit>` and `HEAD`, but keeps those which are\n \tdifferent between the index and working tree (i.e. which have changes\n \twhich have not been added).\n-\tIf a file that is different between <commit> and the index has unstaged\n-\tchanges, reset is aborted.\n+\tIf a file that is different between `<commit>` and the index has\n+\tunstaged changes, reset is aborted.\n +\n-In other words, --merge does something like a 'git read-tree -u -m <commit>',\n+In other words, `--merge` does something like a `git read-tree -u -m <commit>`,\n but carries forward unmerged index entries.\n \n --keep::\n \tResets index entries and updates files in the working tree that are\n-\tdifferent between <commit> and HEAD.\n-\tIf a file that is different between <commit> and HEAD has local changes,\n-\treset is aborted.\n+\tdifferent between `<commit>` and `HEAD`.\n+\tIf a file that is different between `<commit>` and `HEAD` has local\n+\tchanges, reset is aborted.\n --\n \n If you want to undo a commit other than the latest on a branch,\n@@ -116,15 +116,15 @@ $ git pull git://info.example.com/ nitfol  <4>\n +\n <1> You are happily working on something, and find the changes\n in these files are in good order.  You do not want to see them\n-when you run \"git diff\", because you plan to work on other files\n+when you run `git diff`, because you plan to work on other files\n and changes with these files are distracting.\n <2> Somebody asks you to pull, and the changes sound worthy of merging.\n <3> However, you already dirtied the index (i.e. your index does\n-not match the HEAD commit).  But you know the pull you are going\n-to make does not affect frotz.c or filfre.c, so you revert the\n+not match the `HEAD` commit).  But you know the pull you are going\n+to make does not affect `frotz.c` or `filfre.c`, so you revert the\n index changes for these two files.  Your changes in working tree\n remain there.\n-<4> Then you can pull and merge, leaving frotz.c and filfre.c\n+<4> Then you can pull and merge, leaving `frotz.c` and `filfre.c`\n changes still in the working tree.\n \n Undo a commit and redo::\n@@ -140,11 +140,11 @@ $ git commit -a -c ORIG_HEAD  <3>\n just committed is incomplete, or you misspelled your commit\n message, or both.  Leaves working tree as it was before \"reset\".\n <2> Make corrections to working tree files.\n-<3> \"reset\" copies the old head to .git/ORIG_HEAD; redo the\n+<3> \"reset\" copies the old head to `.git/ORIG_HEAD`; redo the\n commit by starting with its log message.  If you do not need to\n-edit the message further, you can give -C option instead.\n+edit the message further, you can give `-C` option instead.\n +\n-See also the --amend option to linkgit:git-commit[1].\n+See also the `--amend` option to linkgit:git-commit[1].\n \n Undo a commit, making it a topic branch::\n +\n@@ -155,11 +155,11 @@ $ git checkout topic/wip   <3>\n ------------\n +\n <1> You have made some commits, but realize they were premature\n-to be in the \"master\" branch.  You want to continue polishing\n-them in a topic branch, so create \"topic/wip\" branch off of the\n-current HEAD.\n+to be in the `master` branch.  You want to continue polishing\n+them in a topic branch, so create `topic/wip` branch off of the\n+current `HEAD`.\n <2> Rewind the master branch to get rid of those three commits.\n-<3> Switch to \"topic/wip\" branch and keep working.\n+<3> Switch to `topic/wip` branch and keep working.\n \n Undo commits permanently::\n +\n@@ -168,7 +168,7 @@ $ git commit ...\n $ git reset --hard HEAD~3   <1>\n ------------\n +\n-<1> The last three commits (HEAD, HEAD^, and HEAD~2) were bad\n+<1> The last three commits (`HEAD`, `HEAD^`, and `HEAD~2`) were bad\n and you do not want to ever see them again.  Do *not* do this if\n you have already given these commits to somebody else.  (See the\n \"RECOVERING FROM UPSTREAM REBASE\" section in linkgit:git-rebase[1] for\n@@ -191,14 +191,14 @@ $ git reset --hard ORIG_HEAD       <4>\n <1> Try to update from the upstream resulted in a lot of\n conflicts; you were not ready to spend a lot of time merging\n right now, so you decide to do that later.\n-<2> \"pull\" has not made merge commit, so \"git reset --hard\"\n-which is a synonym for \"git reset --hard HEAD\" clears the mess\n+<2> \"pull\" has not made merge commit, so `git reset --hard`\n+which is a synonym for `git reset --hard HEAD` clears the mess\n from the index file and the working tree.\n <3> Merge a topic branch into the current branch, which resulted\n in a fast-forward.\n <4> But you decided that the topic branch is not ready for public\n consumption yet.  \"pull\" or \"merge\" always leaves the original\n-tip of the current branch in ORIG_HEAD, so resetting hard to it\n+tip of the current branch in `ORIG_HEAD`, so resetting hard to it\n brings your index file and the working tree back to that state,\n and resets the tip of the branch to that commit.\n \n@@ -214,14 +214,14 @@ $ git reset --merge ORIG_HEAD      <2>\n ------------\n +\n <1> Even if you may have local modifications in your\n-working tree, you can safely say \"git pull\" when you know\n+working tree, you can safely say `git pull` when you know\n that the change in the other branch does not overlap with\n them.\n <2> After inspecting the result of the merge, you may find\n that the change in the other branch is unsatisfactory.  Running\n-\"git reset --hard ORIG_HEAD\" will let you go back to where you\n+`git reset --hard ORIG_HEAD` will let you go back to where you\n were, but it will discard your local changes, which you do not\n-want.  \"git reset --merge\" keeps your local changes.\n+want.  `git reset --merge` keeps your local changes.\n \n \n Interrupted workflow::\n@@ -287,13 +287,13 @@ $ git checkout -b branch2                   <2>\n $ git reset --keep start                    <3>\n ------------\n +\n-<1> This commits your first edits in branch1.\n+<1> This commits your first edits in `branch1`.\n <2> In the ideal world, you could have realized that the earlier\n     commit did not belong to the new topic when you created and switched\n-    to branch2 (i.e. \"git checkout -b branch2 start\"), but nobody is\n+    to `branch2` (i.e. `git checkout -b branch2 start`), but nobody is\n     perfect.\n-<3> But you can use \"reset --keep\" to remove the unwanted commit after\n-    you switched to \"branch2\".\n+<3> But you can use `reset --keep` to remove the unwanted commit after\n+    you switched to `branch2`.\n \n Split a commit apart into a sequence of commits::\n +\n@@ -317,26 +317,27 @@ $ git commit ...                            <8>\n +\n <1> First, reset the history back one commit so that we remove the original\n     commit, but leave the working tree with all the changes. The -N ensures\n-    that any new files added with HEAD are still marked so that git add -p\n+    that any new files added with `HEAD` are still marked so that `git add -p`\n     will find them.\n-<2> Next, we interactively select diff hunks to add using the git add -p\n+<2> Next, we interactively select diff hunks to add using the `git add -p`\n     facility. This will ask you about each diff hunk in sequence and you can\n     use simple commands such as \"yes, include this\", \"No don't include this\"\n     or even the very powerful \"edit\" facility.\n <3> Once satisfied with the hunks you want to include, you should verify what\n-    has been prepared for the first commit by using git diff --cached. This\n+    has been prepared for the first commit by using `git diff --cached`. This\n     shows all the changes that have been moved into the index and are about\n     to be committed.\n-<4> Next, commit the changes stored in the index. The -c option specifies to\n+<4> Next, commit the changes stored in the index. The `-c` option specifies to\n     pre-populate the commit message from the original message that you started\n-    with in the first commit. This is helpful to avoid retyping it. The HEAD@{1}\n-    is a special notation for the commit that HEAD used to be at prior to the\n-    original reset commit (1 change ago). See linkgit:git-reflog[1] for more\n-    details. You may also use any other valid commit reference.\n+    with in the first commit. This is helpful to avoid retyping it. The\n+    `HEAD@{1}` is a special notation for the commit that `HEAD` used to be at\n+    prior to the original reset commit (1 change ago).\n+    See linkgit:git-reflog[1] for more details. You may also use any other\n+    valid commit reference.\n <5> You can repeat steps 2-4 multiple times to break the original code into\n     any number of commits.\n <6> Now you've split out many of the changes into their own commits, and might\n-    no longer use the patch mode of git add, in order to select all remaining\n+    no longer use the patch mode of `git add`, in order to select all remaining\n     uncommitted changes.\n <7> Once again, check to verify that you've included what you want to. You may\n     also wish to verify that git diff doesn't show any remaining changes to be\n@@ -353,17 +354,17 @@ The tables below show what happens when running:\n git reset --option target\n ----------\n \n-to reset the HEAD to another commit (`target`) with the different\n+to reset the `HEAD` to another commit (`target`) with the different\n reset options depending on the state of the files.\n \n-In these tables, A, B, C and D are some different states of a\n+In these tables, `A`, `B`, `C` and `D` are some different states of a\n file. For example, the first line of the first table means that if a\n-file is in state A in the working tree, in state B in the index, in\n-state C in HEAD and in state D in the target, then \"git reset --soft\n-target\" will leave the file in the working tree in state A and in the\n-index in state B.  It resets (i.e. moves) the HEAD (i.e. the tip of\n-the current branch, if you are on one) to \"target\" (which has the file\n-in state D).\n+file is in state `A` in the working tree, in state `B` in the index, in\n+state `C` in `HEAD` and in state `D` in the target, then `git reset --soft\n+target` will leave the file in the working tree in state `A` and in the\n+index in state `B`.  It resets (i.e. moves) the `HEAD` (i.e. the tip of\n+the current branch, if you are on one) to `target` (which has the file\n+in state `D`).\n \n ....\n working index HEAD target         working index HEAD\n@@ -425,21 +426,21 @@ working index HEAD target         working index HEAD\n \t\t\t  --keep   B       C     C\n ....\n \n-\"reset --merge\" is meant to be used when resetting out of a conflicted\n+`reset --merge` is meant to be used when resetting out of a conflicted\n merge. Any mergy operation guarantees that the working tree file that is\n involved in the merge does not have local change wrt the index before\n it starts, and that it writes the result out to the working tree. So if\n we see some difference between the index and the target and also\n between the index and the working tree, then it means that we are not\n resetting out from a state that a mergy operation left after failing\n-with a conflict. That is why we disallow --merge option in this case.\n+with a conflict. That is why we disallow `--merge` option in this case.\n \n-\"reset --keep\" is meant to be used when removing some of the last\n+`reset --keep` is meant to be used when removing some of the last\n commits in the current branch while keeping changes in the working\n tree. If there could be conflicts between the changes in the commit we\n want to remove and the changes in the working tree we want to keep,\n the reset is disallowed. That's why it is disallowed if there are both\n-changes between the working tree and HEAD, and between HEAD and the\n+changes between the working tree and `HEAD`, and between `HEAD` and the\n target. To be safe, it is also disallowed when there are unmerged\n entries.\n \n@@ -466,7 +467,7 @@ working index HEAD target         working index HEAD\n \t\t\t  --keep  (disallowed)\n ....\n \n-X means any state and U means an unmerged index.\n+`X` means any state and `U` means an unmerged index.\n \n GIT\n ---\n-- \n2.20.0.rc1.8.g46351a2c6f\n\n"},{"id":"364240","messageId":"877egxyojp.fsf@evledraar.gmail.com","threadId":"49908","inReplyTo":"1596a9ff9fa6849f53590de1b15eb18ee6b41e4d.1543429054.git.martin.agren@gmail.com","subject":"Re: [PATCH 1/2] git-reset.txt: render tables correctly under Asciidoctor","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2018-11-28T19:44:58Z","receivedAt":"2018-11-28T19:45:03Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"\nOn Wed, Nov 28 2018, Martin Ågren wrote:\n\n> Asciidoctor removes the indentation of each line in these tables, so the\n> last lines of each table have a completely broken alignment.\n>\n> Similar to 379805051d (\"Documentation: render revisions correctly under\n> Asciidoctor\", 2018-05-06), use an explicit literal block to indicate\n> that we want to keep the leading whitespace in the tables.\n>\n> Because this gives us some extra indentation, we can remove the one that\n> we have been carrying explicitly. That is, drop the first six spaces of\n> indentation on each line. With Asciidoc (8.6.10), this results in\n> identical rendering before and after this commit, both for git-reset.1\n> and git-reset.html.\n>\n> Reported-by: Paweł Samoraj <samoraj.pawel@gmail.com>\n> Signed-off-by: Martin Ågren <martin.agren@gmail.com>\n\nEarlier I was trying to get the Documentation/doc-diff script to diff\nthe asciidoc and asciidoctor docs without much success (hadn't used it\nbefore, just hacking the Makefile to turn on asciidoctor yielded syntax\nerrors or something).\n\nIs something like that a thing we could make into a regression test?\n"},{"id":"364250","messageId":"CAN0heSob+Ac4BvM-vuKvPZKxrTW53-d91a55NX5kC7ZyNXntWQ@mail.gmail.com","threadId":"49908","inReplyTo":"877egxyojp.fsf@evledraar.gmail.com","subject":"Re: [PATCH 1/2] git-reset.txt: render tables correctly under Asciidoctor","fromName":"Martin Ågren","fromEmail":"martin.agren@gmail.com","sentAt":"2018-11-28T20:37:19Z","receivedAt":"2018-11-28T20:37:33Z","isPatch":true,"sender":{"key":"martin.agren@gmail.com","avatar":null},"body":"On Wed, 28 Nov 2018 at 20:45, Ævar Arnfjörð Bjarmason <avarab@gmail.com> wrote:\n> On Wed, Nov 28 2018, Martin Ågren wrote:\n>\n> > Asciidoctor removes the indentation of each line in these tables, so the\n> > last lines of each table have a completely broken alignment.\n>\n> Earlier I was trying to get the Documentation/doc-diff script to diff\n> the asciidoc and asciidoctor docs without much success (hadn't used it\n> before, just hacking the Makefile to turn on asciidoctor yielded syntax\n> errors or something).\n>\n> Is something like that a thing we could make into a regression test?\n\nInteresting idea. I just tried a gross hack:\n\n * Use `make --always-make ... install-man` in doc-diff.\n * ./doc-diff -f HEAD HEAD # note -f\n * Add empty commit and tweak config.mak\n * ./doc-diff HEAD^ HEAD # note no -f\n\nThere are lots of irrelevant differences in the headers and footers,\nwhich is a bit unfortunate.\n\nAlso, lots of annoying differences originating in Asciidoctor's\ninclination to render a space after linkgit:foo . There are those\ndifferences themselves, obviously, but also follow-on differences such\nas entire paragraphs that wrap differently.\n\nI could spot a few things that should be fixable on our side, but on a\nquick skimming, I didn't spot too many \"huge\" differences, which feels\ngood. The one which this patch fixes, obviously, and there's some work\nto do in git-status.txt and git-column.txt (at least).\n\nTacking on `--stat` to the call to `git diff --no-index` singles out\ngit-config.txt, but it seems like lots of small or maybe even irrelevant\ndifferences, plus lots of spaces around linkgit: , as already mentioned.\n\nMartin\n"}]}