{"thread":{"id":"62736","subject":"[PATCH] doc: git-restore: migrate to new style format","startedAt":"2025-01-04T13:16:45Z","lastAt":"2025-01-10T10:09:23Z","messageCount":4,"participants":["Jean-Noël Avila via GitGitGadget","Patrick Steinhardt","Jean-Noël AVILA"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"509908","messageId":"pull.1847.git.1735996601092.gitgitgadget@gmail.com","threadId":"62736","inReplyTo":null,"subject":"[PATCH] doc: git-restore: migrate to new style format","fromName":"Jean-Noël Avila via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2025-01-04T13:16:40Z","receivedAt":"2025-01-04T13:16:45Z","isPatch":true,"sender":{"key":"jn.avila@free.fr","avatar":"https://avatars.githubusercontent.com/u/156172?v=4"},"body":"From: =?UTF-8?q?Jean-No=C3=ABl=20Avila?= <jn.avila@free.fr>\n\nThe git-restore manpage was converted to the new documentation\nformat:\n\n- switching the synopsis to a 'synopsis' block which will\n  automatically format placeholders in italics and keywords in\n  monospace\n- use _<placeholder>_ instead of <placeholder> in the description\n- use `backticks for keywords and more complex option\ndescriptions`. The new rendering engine will apply synopsis rules to\nthese spans.\n\nSigned-off-by: Jean-Noël Avila <jn.avila@free.fr>\n---\n    doc: git-restore: migrate to new style format\n\nPublished-As: https://github.com/gitgitgadget/git/releases/tag/pr-1847%2Fjnavila%2Fdoc-git-restore-v1\nFetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1847/jnavila/doc-git-restore-v1\nPull-Request: https://github.com/gitgitgadget/git/pull/1847\n\n Documentation/git-restore.txt | 109 +++++++++++++++++-----------------\n 1 file changed, 54 insertions(+), 55 deletions(-)\n\ndiff --git a/Documentation/git-restore.txt b/Documentation/git-restore.txt\nindex 975825b44aa..541a39b5d28 100644\n--- a/Documentation/git-restore.txt\n+++ b/Documentation/git-restore.txt\n@@ -7,10 +7,10 @@ git-restore - Restore working tree files\n \n SYNOPSIS\n --------\n-[verse]\n-'git restore' [<options>] [--source=<tree>] [--staged] [--worktree] [--] <pathspec>...\n-'git restore' [<options>] [--source=<tree>] [--staged] [--worktree] --pathspec-from-file=<file> [--pathspec-file-nul]\n-'git restore' (-p|--patch) [<options>] [--source=<tree>] [--staged] [--worktree] [--] [<pathspec>...]\n+[synopsis]\n+git restore [<options>] [--source=<tree>] [--staged] [--worktree] [--] <pathspec>...\n+git restore [<options>] [--source=<tree>] [--staged] [--worktree] --pathspec-from-file=<file> [--pathspec-file-nul]\n+git restore (-p|--patch) [<options>] [--source=<tree>] [--staged] [--worktree] [--] [<pathspec>...]\n \n DESCRIPTION\n -----------\n@@ -32,8 +32,8 @@ THIS COMMAND IS EXPERIMENTAL. THE BEHAVIOR MAY CHANGE.\n \n OPTIONS\n -------\n--s <tree>::\n---source=<tree>::\n+`-s <tree>`::\n+`--source=<tree>`::\n \tRestore the working tree files with the content from the given\n \ttree. It is common to specify the source tree by naming a\n \tcommit, branch or tag associated with it.\n@@ -41,79 +41,79 @@ OPTIONS\n If not specified, the contents are restored from `HEAD` if `--staged` is\n given, otherwise from the index.\n +\n-As a special case, you may use `\"A...B\"` as a shortcut for the\n-merge base of `A` and `B` if there is exactly one merge base. You can\n-leave out at most one of `A` and `B`, in which case it defaults to `HEAD`.\n+As a special case, you may use `\"<refA>...<refB>\"` as a shortcut for the\n+merge base of _<refA>_ and _<refB>_ if there is exactly one merge base. You can\n+leave out at most one of _<refA>__ and _<refB>_, in which case it defaults to `HEAD`.\n \n--p::\n---patch::\n+`-p`::\n+`--patch`::\n \tInteractively select hunks in the difference between the\n-\trestore source and the restore location. See the ``Interactive\n-\tMode'' section of linkgit:git-add[1] to learn how to operate\n+\trestore source and the restore location. See the \"Interactive\n+\tMode\" section of linkgit:git-add[1] to learn how to operate\n \tthe `--patch` mode.\n +\n Note that `--patch` can accept no pathspec and will prompt to restore\n all modified paths.\n \n--W::\n---worktree::\n--S::\n---staged::\n+`-W`::\n+`--worktree`::\n+`-S`::\n+`--staged`::\n \tSpecify the restore location. If neither option is specified,\n \tby default the working tree is restored. Specifying `--staged`\n \twill only restore the index. Specifying both restores both.\n \n--q::\n---quiet::\n+`-q`::\n+`--quiet`::\n \tQuiet, suppress feedback messages. Implies `--no-progress`.\n \n---progress::\n---no-progress::\n+`--progress`::\n+`--no-progress`::\n \tProgress status is reported on the standard error stream\n \tby default when it is attached to a terminal, unless `--quiet`\n \tis specified. This flag enables progress reporting even if not\n \tattached to a terminal, regardless of `--quiet`.\n \n---ours::\n---theirs::\n+`--ours`::\n+`--theirs`::\n \tWhen restoring files in the working tree from the index, use\n-\tstage #2 ('ours') or #3 ('theirs') for unmerged paths.\n+\tstage #2 (`ours`) or #3 (`theirs`) for unmerged paths.\n \tThis option cannot be used when checking out paths from a\n \ttree-ish (i.e. with the `--source` option).\n +\n-Note that during `git rebase` and `git pull --rebase`, 'ours' and\n-'theirs' may appear swapped. See the explanation of the same options\n+Note that during `git rebase` and `git pull --rebase`, `ours` and\n+`theirs` may appear swapped. See the explanation of the same options\n in linkgit:git-checkout[1] for details.\n \n--m::\n---merge::\n+`-m`::\n+`--merge`::\n \tWhen restoring files on the working tree from the index,\n \trecreate the conflicted merge in the unmerged paths.\n \tThis option cannot be used when checking out paths from a\n \ttree-ish (i.e. with the `--source` option).\n \n---conflict=<style>::\n+`--conflict=<style>`::\n \tThe same as `--merge` option above, but changes the way the\n \tconflicting hunks are presented, overriding the\n \t`merge.conflictStyle` configuration variable.  Possible values\n-\tare \"merge\" (default), \"diff3\", and \"zdiff3\".\n+\tare `merge` (default), `diff3`, and `zdiff3`.\n \n---ignore-unmerged::\n+`--ignore-unmerged`::\n \tWhen restoring files on the working tree from the index, do\n \tnot abort the operation if there are unmerged entries and\n \tneither `--ours`, `--theirs`, `--merge` or `--conflict` is\n \tspecified. Unmerged paths on the working tree are left alone.\n \n---ignore-skip-worktree-bits::\n+`--ignore-skip-worktree-bits`::\n \tIn sparse checkout mode, the default is to only update entries\n-\tmatched by `<pathspec>` and sparse patterns in\n-\t$GIT_DIR/info/sparse-checkout. This option ignores the sparse\n+\tmatched by _<pathspec>_ and sparse patterns in\n+\t`$GIT_DIR/info/sparse-checkout`. This option ignores the sparse\n \tpatterns and unconditionally restores any files in\n-\t`<pathspec>`.\n+\t_<pathspec>_.\n \n---recurse-submodules::\n---no-recurse-submodules::\n-\tIf `<pathspec>` names an active submodule and the restore location\n+`--recurse-submodules`::\n+`--no-recurse-submodules`::\n+\tIf _<pathspec>_ names an active submodule and the restore location\n \tincludes the working tree, the submodule will only be updated if\n \tthis option is given, in which case its working tree will be\n \trestored to the commit recorded in the superproject, and any local\n@@ -122,30 +122,29 @@ in linkgit:git-checkout[1] for details.\n \tnot be updated. Just like linkgit:git-checkout[1], this will detach\n \t`HEAD` of the submodule.\n \n---overlay::\n---no-overlay::\n-\tIn overlay mode, the command never removes files when\n-\trestoring. In no-overlay mode, tracked files that do not\n-\tappear in the `--source` tree are removed, to make them match\n-\t`<tree>` exactly. The default is no-overlay mode.\n-\n---pathspec-from-file=<file>::\n-\tPathspec is passed in `<file>` instead of commandline args. If\n-\t`<file>` is exactly `-` then standard input is used. Pathspec\n-\telements are separated by LF or CR/LF. Pathspec elements can be\n+`--overlay`::\n+`--no-overlay`::\n+\tIn overlay mode, never remove files when restoring. In no-overlay mode,\n+\tremove tracked files that do not appear in the `--source` tree, to make\n+\tthem match _<tree>_ exactly. The default is no-overlay mode.\n+\n+`--pathspec-from-file=<file>`::\n+\tPathspec is passed in _<file>_ instead of commandline args. If\n+\t_<file>_ is exactly `-` then standard input is used. Pathspec\n+\telements are separated by _LF_ or _CR_/_LF_. Pathspec elements can be\n \tquoted as explained for the configuration variable `core.quotePath`\n \t(see linkgit:git-config[1]). See also `--pathspec-file-nul` and\n \tglobal `--literal-pathspecs`.\n \n---pathspec-file-nul::\n+`--pathspec-file-nul`::\n \tOnly meaningful with `--pathspec-from-file`. Pathspec elements are\n-\tseparated with NUL character and all other characters are taken\n+\tseparated with _NUL_ character and all other characters are taken\n \tliterally (including newlines and quotes).\n \n-\\--::\n+`--`::\n \tDo not interpret any more arguments as options.\n \n-<pathspec>...::\n+`<pathspec>...`::\n \tLimits the paths affected by the operation.\n +\n For more details, see the 'pathspec' entry in linkgit:gitglossary[7].\n@@ -154,7 +153,7 @@ EXAMPLES\n --------\n \n The following sequence switches to the `master` branch, reverts the\n-`Makefile` to two revisions back, deletes hello.c by mistake, and gets\n+`Makefile` to two revisions back, deletes `hello.c` by mistake, and gets\n it back from the index.\n \n ------------\n@@ -165,7 +164,7 @@ $ git restore hello.c                     <2>\n ------------\n \n <1> take a file out of another commit\n-<2> restore hello.c from the index\n+<2> restore `hello.c` from the index\n \n If you want to restore _all_ C source files to match the version in\n the index, you can say\n\nbase-commit: 1b4e9a5f8b5f048972c21fe8acafe0404096f694\n-- \ngitgitgadget\n"},{"id":"509948","messageId":"Z3t8sjsCeiPmHffA@pks.im","threadId":"62736","inReplyTo":"pull.1847.git.1735996601092.gitgitgadget@gmail.com","subject":"Re: [PATCH] doc: git-restore: migrate to new style format","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2025-01-06T06:48:27Z","receivedAt":"2025-01-06T06:48:33Z","isPatch":true,"sender":{"key":"ps@pks.im","avatar":"https://avatars.githubusercontent.com/u/4056630?v=4"},"body":"On Sat, Jan 04, 2025 at 01:16:40PM +0000, Jean-Noël Avila via GitGitGadget wrote:\n> From: =?UTF-8?q?Jean-No=C3=ABl=20Avila?= <jn.avila@free.fr>\n> \n> The git-restore manpage was converted to the new documentation\n> format:\n\nCommit messages should typically use imperative style, as if asking the\ncode to change. For example:\n\n  Convert the git-restore(1) man page to our new documentation format.\n  This includes the following conversions:\n\n    - Switch the synopsis to a 'synopsis' block, which will\n      automatically format placeholders in italics and keywords in\n      monospace.\n\n    - Use `_<placeholder>_` instead of `<placeholder>` in the\n      description.\n\n    - Use backticks for keywords and more complex option descriptions.\n      The new rendering engine will apply synopsis rules to these spans.\n\n> diff --git a/Documentation/git-restore.txt b/Documentation/git-restore.txt\n> index 975825b44aa..541a39b5d28 100644\n> --- a/Documentation/git-restore.txt\n> +++ b/Documentation/git-restore.txt\n> @@ -41,79 +41,79 @@ OPTIONS\n>  If not specified, the contents are restored from `HEAD` if `--staged` is\n>  given, otherwise from the index.\n>  +\n> -As a special case, you may use `\"A...B\"` as a shortcut for the\n> -merge base of `A` and `B` if there is exactly one merge base. You can\n> -leave out at most one of `A` and `B`, in which case it defaults to `HEAD`.\n> +As a special case, you may use `\"<refA>...<refB>\"` as a shortcut for the\n> +merge base of _<refA>_ and _<refB>_ if there is exactly one merge base. You can\n> +leave out at most one of _<refA>__ and _<refB>_, in which case it defaults to `HEAD`.\n\nThis change is a bit surprising to me though. Why was this renamed from\nA and B to refA and refB, respectively? It should be possible for these\nto be object IDs and not refs.\n\n> @@ -122,30 +122,29 @@ in linkgit:git-checkout[1] for details.\n>  \tnot be updated. Just like linkgit:git-checkout[1], this will detach\n>  \t`HEAD` of the submodule.\n>  \n> ---overlay::\n> ---no-overlay::\n> -\tIn overlay mode, the command never removes files when\n> -\trestoring. In no-overlay mode, tracked files that do not\n> -\tappear in the `--source` tree are removed, to make them match\n> -\t`<tree>` exactly. The default is no-overlay mode.\n> -\n> ---pathspec-from-file=<file>::\n> -\tPathspec is passed in `<file>` instead of commandline args. If\n> -\t`<file>` is exactly `-` then standard input is used. Pathspec\n> -\telements are separated by LF or CR/LF. Pathspec elements can be\n> +`--overlay`::\n> +`--no-overlay`::\n> +\tIn overlay mode, never remove files when restoring. In no-overlay mode,\n> +\tremove tracked files that do not appear in the `--source` tree, to make\n> +\tthem match _<tree>_ exactly. The default is no-overlay mode.\n> +\n> +`--pathspec-from-file=<file>`::\n> +\tPathspec is passed in _<file>_ instead of commandline args. If\n> +\t_<file>_ is exactly `-` then standard input is used. Pathspec\n> +\telements are separated by _LF_ or _CR_/_LF_. Pathspec elements can be\n\nThe reflowing of these paragraphs makes it a bit hard to see what\nexactly is changing.\n\nThanks!\n\nPatrick\n"},{"id":"510126","messageId":"6011894.MhkbZ0Pkbq@cayenne","threadId":"62736","inReplyTo":"Z3t8sjsCeiPmHffA@pks.im","subject":"Re: [PATCH] doc: git-restore: migrate to new style format","fromName":"Jean-Noël AVILA","fromEmail":"jn.avila@free.fr","sentAt":"2025-01-07T21:48:21Z","receivedAt":"2025-01-07T21:48:25Z","isPatch":true,"sender":{"key":"jn.avila@free.fr","avatar":"https://avatars.githubusercontent.com/u/156172?v=4"},"body":"On Monday, 6 January 2025 07:48:27 CET Patrick Steinhardt wrote:\n> On Sat, Jan 04, 2025 at 01:16:40PM +0000, Jean-Noël Avila via GitGitGadget \nwrote:\n> > From: =?UTF-8?q?Jean-No=C3=ABl=20Avila?= <jn.avila@free.fr>\n> > \n> > The git-restore manpage was converted to the new documentation\n> > format:\n> \n> Commit messages should typically use imperative style, as if asking the\n> code to change. For example:\n> \n>   Convert the git-restore(1) man page to our new documentation format.\n>   This includes the following conversions:\n> \n>     - Switch the synopsis to a 'synopsis' block, which will\n>       automatically format placeholders in italics and keywords in\n>       monospace.\n> \n>     - Use `_<placeholder>_` instead of `<placeholder>` in the\n>       description.\n> \n>     - Use backticks for keywords and more complex option descriptions.\n>       The new rendering engine will apply synopsis rules to these spans.\n> \n\nWill do.\n\n> > diff --git a/Documentation/git-restore.txt b/Documentation/git-restore.txt\n> > index 975825b44aa..541a39b5d28 100644\n> > --- a/Documentation/git-restore.txt\n> > +++ b/Documentation/git-restore.txt\n> > @@ -41,79 +41,79 @@ OPTIONS\n> >  If not specified, the contents are restored from `HEAD` if `--staged` is\n> >  given, otherwise from the index.\n> >  +\n> > -As a special case, you may use `\"A...B\"` as a shortcut for the\n> > -merge base of `A` and `B` if there is exactly one merge base. You can\n> > -leave out at most one of `A` and `B`, in which case it defaults to \n`HEAD`.\n> > +As a special case, you may use `\"<refA>...<refB>\"` as a shortcut for the\n> > +merge base of _<refA>_ and _<refB>_ if there is exactly one merge base. \nYou can\n> > +leave out at most one of _<refA>__ and _<refB>_, in which case it \ndefaults to `HEAD`.\n> \n> This change is a bit surprising to me though. Why was this renamed from\n> A and B to refA and refB, respectively? It should be possible for these\n> to be object IDs and not refs.\n\nSorry for mixing things up revs with refs. The \"A\" and \"B\" are just \nplaceholders for revisions, and their names need to be more informative. \n\nSo, it should be <rev-A> and <rev-B> all along.\n\n> \n> > @@ -122,30 +122,29 @@ in linkgit:git-checkout[1] for details.\n> >  \tnot be updated. Just like linkgit:git-checkout[1], this will \ndetach\n> >  \t`HEAD` of the submodule.\n> >  \n> > ---overlay::\n> > ---no-overlay::\n> > -\tIn overlay mode, the command never removes files when\n> > -\trestoring. In no-overlay mode, tracked files that do not\n> > -\tappear in the `--source` tree are removed, to make them match\n> > -\t`<tree>` exactly. The default is no-overlay mode.\n> > -\n> > ---pathspec-from-file=<file>::\n> > -\tPathspec is passed in `<file>` instead of commandline args. If\n> > -\t`<file>` is exactly `-` then standard input is used. Pathspec\n> > -\telements are separated by LF or CR/LF. Pathspec elements can be\n> > +`--overlay`::\n> > +`--no-overlay`::\n> > +\tIn overlay mode, never remove files when restoring. In no-overlay \nmode,\n> > +\tremove tracked files that do not appear in the `--source` tree, to \nmake\n> > +\tthem match _<tree>_ exactly. The default is no-overlay mode.\n> > +\n> > +`--pathspec-from-file=<file>`::\n> > +\tPathspec is passed in _<file>_ instead of commandline args. If\n> > +\t_<file>_ is exactly `-` then standard input is used. Pathspec\n> > +\telements are separated by _LF_ or _CR_/_LF_. Pathspec elements can \nbe\n> \n> The reflowing of these paragraphs makes it a bit hard to see what\n> exactly is changing.\n> \n\nFor the first set of options, there is a conversion to imperative mood, and I \ntriggered a reflow.\n For the second one, it just appears that all lines are slightly changed by \nthe new formatting.\n\nMore generally, I kept reflowing the paragraphs to maintain the width, because \nthis was done everywhere before, but I would strongly prefer having each \nsentence on separate line, regardless of its length. For asciidoc texts, this \npolicy has some advantages:\n * keep a lexical entity as a single line, and get rid messed up diffs due to \nreflowing.\n * unfortunate automatic reflows can create errors, for instance when a part of \ntext is sent to the beginning of line and is interpreted as a list item.\n\nJN\n\n\n\n"},{"id":"510285","messageId":"pull.1847.v2.git.1736503760086.gitgitgadget@gmail.com","threadId":"62736","inReplyTo":"pull.1847.git.1735996601092.gitgitgadget@gmail.com","subject":"[PATCH v2] doc: convert git-restore to new style format","fromName":"Jean-Noël Avila via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2025-01-10T10:09:19Z","receivedAt":"2025-01-10T10:09:23Z","isPatch":true,"sender":{"key":"jn.avila@free.fr","avatar":"https://avatars.githubusercontent.com/u/156172?v=4"},"body":"From: =?UTF-8?q?Jean-No=C3=ABl=20Avila?= <jn.avila@free.fr>\n\n- Switch the synopsis to a 'synopsis' block which will\n  automatically format placeholders in italics and keywords in\n  monospace\n\n- Use _<placeholder>_ instead of <placeholder> in the description\n\n- Use backticks for keywords and more complex option\ndescriptions. The new rendering engine will apply synopsis rules to\nthese spans.\n\nWhile at it, also convert an option description to imperative mood.\n\nSigned-off-by: Jean-Noël Avila <jn.avila@free.fr>\n---\n    doc: git-restore: migrate to new style format\n    \n    cc: Patrick Steinhardt ps@pks.im\n\nPublished-As: https://github.com/gitgitgadget/git/releases/tag/pr-1847%2Fjnavila%2Fdoc-git-restore-v2\nFetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1847/jnavila/doc-git-restore-v2\nPull-Request: https://github.com/gitgitgadget/git/pull/1847\n\nRange-diff vs v1:\n\n 1:  424ddb959ff ! 1:  69c01f08852 doc: git-restore: migrate to new style format\n     @@ Metadata\n      Author: Jean-Noël Avila <jn.avila@free.fr>\n      \n       ## Commit message ##\n     -    doc: git-restore: migrate to new style format\n     +    doc: convert git-restore to new style format\n      \n     -    The git-restore manpage was converted to the new documentation\n     -    format:\n     -\n     -    - switching the synopsis to a 'synopsis' block which will\n     +    - Switch the synopsis to a 'synopsis' block which will\n            automatically format placeholders in italics and keywords in\n            monospace\n     -    - use _<placeholder>_ instead of <placeholder> in the description\n     -    - use `backticks for keywords and more complex option\n     -    descriptions`. The new rendering engine will apply synopsis rules to\n     +\n     +    - Use _<placeholder>_ instead of <placeholder> in the description\n     +\n     +    - Use backticks for keywords and more complex option\n     +    descriptions. The new rendering engine will apply synopsis rules to\n          these spans.\n      \n     +    While at it, also convert an option description to imperative mood.\n     +\n          Signed-off-by: Jean-Noël Avila <jn.avila@free.fr>\n      \n       ## Documentation/git-restore.txt ##\n     @@ Documentation/git-restore.txt: OPTIONS\n      -As a special case, you may use `\"A...B\"` as a shortcut for the\n      -merge base of `A` and `B` if there is exactly one merge base. You can\n      -leave out at most one of `A` and `B`, in which case it defaults to `HEAD`.\n     -+As a special case, you may use `\"<refA>...<refB>\"` as a shortcut for the\n     -+merge base of _<refA>_ and _<refB>_ if there is exactly one merge base. You can\n     -+leave out at most one of _<refA>__ and _<refB>_, in which case it defaults to `HEAD`.\n     ++As a special case, you may use `\"<rev-A>...<rev-B>\"` as a shortcut for the\n     ++merge base of _<rev-A>_ and _<rev-B>_ if there is exactly one merge base. You can\n     ++leave out at most one of _<rev-A>__ and _<rev-B>_, in which case it defaults to `HEAD`.\n       \n      --p::\n      ---patch::\n     @@ Documentation/git-restore.txt: in linkgit:git-checkout[1] for details.\n      +`--overlay`::\n      +`--no-overlay`::\n      +\tIn overlay mode, never remove files when restoring. In no-overlay mode,\n     -+\tremove tracked files that do not appear in the `--source` tree, to make\n     -+\tthem match _<tree>_ exactly. The default is no-overlay mode.\n     ++\tremove tracked files that do not appear in the _<tree>_ of\n     ++\t`--source=<tree>`, to make them match _<tree>_ exactly. The default\n     ++\tis no-overlay mode.\n      +\n      +`--pathspec-from-file=<file>`::\n      +\tPathspec is passed in _<file>_ instead of commandline args. If\n\n\n Documentation/git-restore.txt | 110 +++++++++++++++++-----------------\n 1 file changed, 55 insertions(+), 55 deletions(-)\n\ndiff --git a/Documentation/git-restore.txt b/Documentation/git-restore.txt\nindex 975825b44aa..751f01b4418 100644\n--- a/Documentation/git-restore.txt\n+++ b/Documentation/git-restore.txt\n@@ -7,10 +7,10 @@ git-restore - Restore working tree files\n \n SYNOPSIS\n --------\n-[verse]\n-'git restore' [<options>] [--source=<tree>] [--staged] [--worktree] [--] <pathspec>...\n-'git restore' [<options>] [--source=<tree>] [--staged] [--worktree] --pathspec-from-file=<file> [--pathspec-file-nul]\n-'git restore' (-p|--patch) [<options>] [--source=<tree>] [--staged] [--worktree] [--] [<pathspec>...]\n+[synopsis]\n+git restore [<options>] [--source=<tree>] [--staged] [--worktree] [--] <pathspec>...\n+git restore [<options>] [--source=<tree>] [--staged] [--worktree] --pathspec-from-file=<file> [--pathspec-file-nul]\n+git restore (-p|--patch) [<options>] [--source=<tree>] [--staged] [--worktree] [--] [<pathspec>...]\n \n DESCRIPTION\n -----------\n@@ -32,8 +32,8 @@ THIS COMMAND IS EXPERIMENTAL. THE BEHAVIOR MAY CHANGE.\n \n OPTIONS\n -------\n--s <tree>::\n---source=<tree>::\n+`-s <tree>`::\n+`--source=<tree>`::\n \tRestore the working tree files with the content from the given\n \ttree. It is common to specify the source tree by naming a\n \tcommit, branch or tag associated with it.\n@@ -41,79 +41,79 @@ OPTIONS\n If not specified, the contents are restored from `HEAD` if `--staged` is\n given, otherwise from the index.\n +\n-As a special case, you may use `\"A...B\"` as a shortcut for the\n-merge base of `A` and `B` if there is exactly one merge base. You can\n-leave out at most one of `A` and `B`, in which case it defaults to `HEAD`.\n+As a special case, you may use `\"<rev-A>...<rev-B>\"` as a shortcut for the\n+merge base of _<rev-A>_ and _<rev-B>_ if there is exactly one merge base. You can\n+leave out at most one of _<rev-A>__ and _<rev-B>_, in which case it defaults to `HEAD`.\n \n--p::\n---patch::\n+`-p`::\n+`--patch`::\n \tInteractively select hunks in the difference between the\n-\trestore source and the restore location. See the ``Interactive\n-\tMode'' section of linkgit:git-add[1] to learn how to operate\n+\trestore source and the restore location. See the \"Interactive\n+\tMode\" section of linkgit:git-add[1] to learn how to operate\n \tthe `--patch` mode.\n +\n Note that `--patch` can accept no pathspec and will prompt to restore\n all modified paths.\n \n--W::\n---worktree::\n--S::\n---staged::\n+`-W`::\n+`--worktree`::\n+`-S`::\n+`--staged`::\n \tSpecify the restore location. If neither option is specified,\n \tby default the working tree is restored. Specifying `--staged`\n \twill only restore the index. Specifying both restores both.\n \n--q::\n---quiet::\n+`-q`::\n+`--quiet`::\n \tQuiet, suppress feedback messages. Implies `--no-progress`.\n \n---progress::\n---no-progress::\n+`--progress`::\n+`--no-progress`::\n \tProgress status is reported on the standard error stream\n \tby default when it is attached to a terminal, unless `--quiet`\n \tis specified. This flag enables progress reporting even if not\n \tattached to a terminal, regardless of `--quiet`.\n \n---ours::\n---theirs::\n+`--ours`::\n+`--theirs`::\n \tWhen restoring files in the working tree from the index, use\n-\tstage #2 ('ours') or #3 ('theirs') for unmerged paths.\n+\tstage #2 (`ours`) or #3 (`theirs`) for unmerged paths.\n \tThis option cannot be used when checking out paths from a\n \ttree-ish (i.e. with the `--source` option).\n +\n-Note that during `git rebase` and `git pull --rebase`, 'ours' and\n-'theirs' may appear swapped. See the explanation of the same options\n+Note that during `git rebase` and `git pull --rebase`, `ours` and\n+`theirs` may appear swapped. See the explanation of the same options\n in linkgit:git-checkout[1] for details.\n \n--m::\n---merge::\n+`-m`::\n+`--merge`::\n \tWhen restoring files on the working tree from the index,\n \trecreate the conflicted merge in the unmerged paths.\n \tThis option cannot be used when checking out paths from a\n \ttree-ish (i.e. with the `--source` option).\n \n---conflict=<style>::\n+`--conflict=<style>`::\n \tThe same as `--merge` option above, but changes the way the\n \tconflicting hunks are presented, overriding the\n \t`merge.conflictStyle` configuration variable.  Possible values\n-\tare \"merge\" (default), \"diff3\", and \"zdiff3\".\n+\tare `merge` (default), `diff3`, and `zdiff3`.\n \n---ignore-unmerged::\n+`--ignore-unmerged`::\n \tWhen restoring files on the working tree from the index, do\n \tnot abort the operation if there are unmerged entries and\n \tneither `--ours`, `--theirs`, `--merge` or `--conflict` is\n \tspecified. Unmerged paths on the working tree are left alone.\n \n---ignore-skip-worktree-bits::\n+`--ignore-skip-worktree-bits`::\n \tIn sparse checkout mode, the default is to only update entries\n-\tmatched by `<pathspec>` and sparse patterns in\n-\t$GIT_DIR/info/sparse-checkout. This option ignores the sparse\n+\tmatched by _<pathspec>_ and sparse patterns in\n+\t`$GIT_DIR/info/sparse-checkout`. This option ignores the sparse\n \tpatterns and unconditionally restores any files in\n-\t`<pathspec>`.\n+\t_<pathspec>_.\n \n---recurse-submodules::\n---no-recurse-submodules::\n-\tIf `<pathspec>` names an active submodule and the restore location\n+`--recurse-submodules`::\n+`--no-recurse-submodules`::\n+\tIf _<pathspec>_ names an active submodule and the restore location\n \tincludes the working tree, the submodule will only be updated if\n \tthis option is given, in which case its working tree will be\n \trestored to the commit recorded in the superproject, and any local\n@@ -122,30 +122,30 @@ in linkgit:git-checkout[1] for details.\n \tnot be updated. Just like linkgit:git-checkout[1], this will detach\n \t`HEAD` of the submodule.\n \n---overlay::\n---no-overlay::\n-\tIn overlay mode, the command never removes files when\n-\trestoring. In no-overlay mode, tracked files that do not\n-\tappear in the `--source` tree are removed, to make them match\n-\t`<tree>` exactly. The default is no-overlay mode.\n-\n---pathspec-from-file=<file>::\n-\tPathspec is passed in `<file>` instead of commandline args. If\n-\t`<file>` is exactly `-` then standard input is used. Pathspec\n-\telements are separated by LF or CR/LF. Pathspec elements can be\n+`--overlay`::\n+`--no-overlay`::\n+\tIn overlay mode, never remove files when restoring. In no-overlay mode,\n+\tremove tracked files that do not appear in the _<tree>_ of\n+\t`--source=<tree>`, to make them match _<tree>_ exactly. The default\n+\tis no-overlay mode.\n+\n+`--pathspec-from-file=<file>`::\n+\tPathspec is passed in _<file>_ instead of commandline args. If\n+\t_<file>_ is exactly `-` then standard input is used. Pathspec\n+\telements are separated by _LF_ or _CR_/_LF_. Pathspec elements can be\n \tquoted as explained for the configuration variable `core.quotePath`\n \t(see linkgit:git-config[1]). See also `--pathspec-file-nul` and\n \tglobal `--literal-pathspecs`.\n \n---pathspec-file-nul::\n+`--pathspec-file-nul`::\n \tOnly meaningful with `--pathspec-from-file`. Pathspec elements are\n-\tseparated with NUL character and all other characters are taken\n+\tseparated with _NUL_ character and all other characters are taken\n \tliterally (including newlines and quotes).\n \n-\\--::\n+`--`::\n \tDo not interpret any more arguments as options.\n \n-<pathspec>...::\n+`<pathspec>...`::\n \tLimits the paths affected by the operation.\n +\n For more details, see the 'pathspec' entry in linkgit:gitglossary[7].\n@@ -154,7 +154,7 @@ EXAMPLES\n --------\n \n The following sequence switches to the `master` branch, reverts the\n-`Makefile` to two revisions back, deletes hello.c by mistake, and gets\n+`Makefile` to two revisions back, deletes `hello.c` by mistake, and gets\n it back from the index.\n \n ------------\n@@ -165,7 +165,7 @@ $ git restore hello.c                     <2>\n ------------\n \n <1> take a file out of another commit\n-<2> restore hello.c from the index\n+<2> restore `hello.c` from the index\n \n If you want to restore _all_ C source files to match the version in\n the index, you can say\n\nbase-commit: 1b4e9a5f8b5f048972c21fe8acafe0404096f694\n-- \ngitgitgadget\n"}]}