{"thread":{"id":"59697","subject":"[PATCH] doc: restore: remove note on --patch w/ pathspecs","startedAt":"2023-05-05T10:32:41Z","lastAt":"2025-03-17T22:11:12Z","messageCount":6,"participants":["Adam Johnson via GitGitGadget","Adam Johnson","Junio C Hamano","Johannes Schindelin"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"476620","messageId":"pull.1504.git.git.1683282753768.gitgitgadget@gmail.com","threadId":"59697","inReplyTo":null,"subject":"[PATCH] doc: restore: remove note on --patch w/ pathspecs","fromName":"Adam Johnson via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2023-05-05T10:32:33Z","receivedAt":"2023-05-05T10:32:41Z","isPatch":true,"sender":{"key":"me@adamj.eu","avatar":"https://avatars.githubusercontent.com/u/857609?v=4"},"body":"From: Adam Johnson <me@adamj.eu>\n\nThis note was added with the command in 46e91b663b (checkout: split part of\nit to new command 'restore', 2019-04-25), but it is now inaccurate. The\nunderlying builtin `add -i` implementation, made default in 0527ccb1b5 (add\n-i: default to the built-in implementation, 2021-11-30), supports pathspecs,\nso `git restore -p <pathspec>...` has worked for all users since then. I\nbisected to verify this was the commit that added support.\n\nSigned-off-by: Adam Johnson <me@adamj.eu>\n---\n    doc: restore: remove note on --patch w/ pathspecs\n    \n    This note was added with the command in 46e91b663b, but it is now\n    inaccurate. The underlying builtin add -i implementation, made default\n    in 0527ccb1b5, does support pathspecs, so git restore -p <pathspec>...\n    has worked for all users since then. I bisected to verify this.\n\nPublished-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-1504%2Fadamchainz%2Faj%2Fgit-restore-patch-docs-fix-v1\nFetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-1504/adamchainz/aj/git-restore-patch-docs-fix-v1\nPull-Request: https://github.com/git/git/pull/1504\n\n Documentation/git-restore.txt | 3 ---\n 1 file changed, 3 deletions(-)\n\ndiff --git a/Documentation/git-restore.txt b/Documentation/git-restore.txt\nindex 5964810caa4..d31a06a673e 100644\n--- a/Documentation/git-restore.txt\n+++ b/Documentation/git-restore.txt\n@@ -51,9 +51,6 @@ leave out at most one of `A` and `B`, in which case it defaults to `HEAD`.\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\nbase-commit: f285f68a132109c234d93490671c00218066ace9\n-- \ngitgitgadget\n"},{"id":"477712","messageId":"CAMyDDM2iwpXkZOBB+9wLDwbcu-_KzEmDvXhSwnXXaHN+KNOieQ@mail.gmail.com","threadId":"59697","inReplyTo":"pull.1504.git.git.1683282753768.gitgitgadget@gmail.com","subject":"Re: [PATCH] doc: restore: remove note on --patch w/ pathspecs","fromName":"Adam Johnson","fromEmail":"me@adamj.eu","sentAt":"2023-05-25T07:25:42Z","receivedAt":"2023-05-25T07:26:03Z","isPatch":true,"sender":{"key":"me@adamj.eu","avatar":"https://avatars.githubusercontent.com/u/857609?v=4"},"body":"Hi, is there anything I can do to help with review?\n\n\nOn Fri, May 5, 2023 at 11:32 AM Adam Johnson via GitGitGadget\n<gitgitgadget@gmail.com> wrote:\n>\n> From: Adam Johnson <me@adamj.eu>\n>\n> This note was added with the command in 46e91b663b (checkout: split part of\n> it to new command 'restore', 2019-04-25), but it is now inaccurate. The\n> underlying builtin `add -i` implementation, made default in 0527ccb1b5 (add\n> -i: default to the built-in implementation, 2021-11-30), supports pathspecs,\n> so `git restore -p <pathspec>...` has worked for all users since then. I\n> bisected to verify this was the commit that added support.\n>\n> Signed-off-by: Adam Johnson <me@adamj.eu>\n> ---\n>     doc: restore: remove note on --patch w/ pathspecs\n>\n>     This note was added with the command in 46e91b663b, but it is now\n>     inaccurate. The underlying builtin add -i implementation, made default\n>     in 0527ccb1b5, does support pathspecs, so git restore -p <pathspec>...\n>     has worked for all users since then. I bisected to verify this.\n>\n> Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-1504%2Fadamchainz%2Faj%2Fgit-restore-patch-docs-fix-v1\n> Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-1504/adamchainz/aj/git-restore-patch-docs-fix-v1\n> Pull-Request: https://github.com/git/git/pull/1504\n>\n>  Documentation/git-restore.txt | 3 ---\n>  1 file changed, 3 deletions(-)\n>\n> diff --git a/Documentation/git-restore.txt b/Documentation/git-restore.txt\n> index 5964810caa4..d31a06a673e 100644\n> --- a/Documentation/git-restore.txt\n> +++ b/Documentation/git-restore.txt\n> @@ -51,9 +51,6 @@ leave out at most one of `A` and `B`, in which case it defaults to `HEAD`.\n>         restore source and the restore location. See the ``Interactive\n>         Mode'' section of linkgit:git-add[1] to learn how to operate\n>         the `--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>\n> base-commit: f285f68a132109c234d93490671c00218066ace9\n> --\n> gitgitgadget\n"},{"id":"477850","messageId":"xmqq5y87epjw.fsf@gitster.g","threadId":"59697","inReplyTo":"CAMyDDM2iwpXkZOBB+9wLDwbcu-_KzEmDvXhSwnXXaHN+KNOieQ@mail.gmail.com","subject":"Re: [PATCH] doc: restore: remove note on --patch w/ pathspecs","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2023-06-01T05:09:55Z","receivedAt":"2023-06-01T05:10:01Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Adam Johnson <me@adamj.eu> writes:\n\n> Hi, is there anything I can do to help with review?\n\nOne good thing you can do is to ping like you did ;-)\n\nI have been down/sick and will be a bit busy with release work but\nafter that I may find time to review it myself, as it sounds like an\neasy change.  But I'll comment on something I immediately spotted.\n\n>\n> On Fri, May 5, 2023 at 11:32 AM Adam Johnson via GitGitGadget\n> <gitgitgadget@gmail.com> wrote:\n>>\n>> From: Adam Johnson <me@adamj.eu>\n>>\n>> This note was added with the command in 46e91b663b (checkout: split part of\n\n\"command\" -> \"commit\", I think.\n"},{"id":"477901","messageId":"pull.1504.v2.git.git.1685654097812.gitgitgadget@gmail.com","threadId":"59697","inReplyTo":"pull.1504.git.git.1683282753768.gitgitgadget@gmail.com","subject":"[PATCH v2] doc: restore: remove note on --patch w/ pathspecs","fromName":"Adam Johnson via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2023-06-01T21:14:57Z","receivedAt":"2023-06-01T21:15:04Z","isPatch":true,"sender":{"key":"me@adamj.eu","avatar":"https://avatars.githubusercontent.com/u/857609?v=4"},"body":"From: Adam Johnson <me@adamj.eu>\n\nThis note was added with the restore command docs in 46e91b663b\n(checkout: split part of it to new command 'restore', 2019-04-25), but it is\nnow inaccurate. The underlying builtin `add -i` implementation, made default\nin 0527ccb1b5 (add -i: default to the built-in implementation, 2021-11-30),\nsupports pathspecs, so `git restore -p <pathspec>...` has worked for all\nusers since then. I bisected to verify this was the commit that added\nsupport.\n\nSigned-off-by: Adam Johnson <me@adamj.eu>\n---\n    doc: restore: remove note on --patch w/ pathspecs\n    \n    This note was added with the command in 46e91b663b, but it is now\n    inaccurate. The underlying builtin add -i implementation, made default\n    in 0527ccb1b5, does support pathspecs, so git restore -p <pathspec>...\n    has worked for all users since then. I bisected to verify this.\n\nPublished-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-1504%2Fadamchainz%2Faj%2Fgit-restore-patch-docs-fix-v2\nFetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-1504/adamchainz/aj/git-restore-patch-docs-fix-v2\nPull-Request: https://github.com/git/git/pull/1504\n\nRange-diff vs v1:\n\n 1:  784143b9949 ! 1:  556f4323ce6 doc: restore: remove note on --patch w/ pathspecs\n     @@ Metadata\n       ## Commit message ##\n          doc: restore: remove note on --patch w/ pathspecs\n      \n     -    This note was added with the command in 46e91b663b (checkout: split part of\n     -    it to new command 'restore', 2019-04-25), but it is now inaccurate. The\n     -    underlying builtin `add -i` implementation, made default in 0527ccb1b5 (add\n     -    -i: default to the built-in implementation, 2021-11-30), supports pathspecs,\n     -    so `git restore -p <pathspec>...` has worked for all users since then. I\n     -    bisected to verify this was the commit that added support.\n     +    This note was added with the restore command docs in 46e91b663b\n     +    (checkout: split part of it to new command 'restore', 2019-04-25), but it is\n     +    now inaccurate. The underlying builtin `add -i` implementation, made default\n     +    in 0527ccb1b5 (add -i: default to the built-in implementation, 2021-11-30),\n     +    supports pathspecs, so `git restore -p <pathspec>...` has worked for all\n     +    users since then. I bisected to verify this was the commit that added\n     +    support.\n      \n          Signed-off-by: Adam Johnson <me@adamj.eu>\n      \n\n\n Documentation/git-restore.txt | 3 ---\n 1 file changed, 3 deletions(-)\n\ndiff --git a/Documentation/git-restore.txt b/Documentation/git-restore.txt\nindex 5964810caa4..d31a06a673e 100644\n--- a/Documentation/git-restore.txt\n+++ b/Documentation/git-restore.txt\n@@ -51,9 +51,6 @@ leave out at most one of `A` and `B`, in which case it defaults to `HEAD`.\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\nbase-commit: f285f68a132109c234d93490671c00218066ace9\n-- \ngitgitgadget\n"},{"id":"514368","messageId":"8c8da3d4-5184-f83c-c08c-51805fe9ca99@gmx.de","threadId":"59697","inReplyTo":"pull.1504.v2.git.git.1685654097812.gitgitgadget@gmail.com","subject":"Re: [PATCH v2] doc: restore: remove note on --patch w/ pathspecs","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2025-03-16T00:47:31Z","receivedAt":"2025-03-16T00:47:33Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Adam,\n\nOn Thu, 1 Jun 2023, Adam Johnson via GitGitGadget wrote:\n\n> From: Adam Johnson <me@adamj.eu>\n>\n> This note was added with the restore command docs in 46e91b663b\n> (checkout: split part of it to new command 'restore', 2019-04-25), but it is\n> now inaccurate. The underlying builtin `add -i` implementation, made default\n> in 0527ccb1b5 (add -i: default to the built-in implementation, 2021-11-30),\n> supports pathspecs, so `git restore -p <pathspec>...` has worked for all\n> users since then. I bisected to verify this was the commit that added\n> support.\n>\n> Signed-off-by: Adam Johnson <me@adamj.eu>\n> ---\n>     doc: restore: remove note on --patch w/ pathspecs\n>\n>     This note was added with the command in 46e91b663b, but it is now\n>     inaccurate. The underlying builtin add -i implementation, made default\n>     in 0527ccb1b5, does support pathspecs, so git restore -p <pathspec>...\n>     has worked for all users since then. I bisected to verify this.\n>\n> Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-1504%2Fadamchainz%2Faj%2Fgit-restore-patch-docs-fix-v2\n> Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-1504/adamchainz/aj/git-restore-patch-docs-fix-v2\n> Pull-Request: https://github.com/git/git/pull/1504\n>\n> Range-diff vs v1:\n>\n>  1:  784143b9949 ! 1:  556f4323ce6 doc: restore: remove note on --patch w/ pathspecs\n>      @@ Metadata\n>        ## Commit message ##\n>           doc: restore: remove note on --patch w/ pathspecs\n>\n>      -    This note was added with the command in 46e91b663b (checkout: split part of\n>      -    it to new command 'restore', 2019-04-25), but it is now inaccurate. The\n>      -    underlying builtin `add -i` implementation, made default in 0527ccb1b5 (add\n>      -    -i: default to the built-in implementation, 2021-11-30), supports pathspecs,\n>      -    so `git restore -p <pathspec>...` has worked for all users since then. I\n>      -    bisected to verify this was the commit that added support.\n>      +    This note was added with the restore command docs in 46e91b663b\n>      +    (checkout: split part of it to new command 'restore', 2019-04-25), but it is\n>      +    now inaccurate. The underlying builtin `add -i` implementation, made default\n>      +    in 0527ccb1b5 (add -i: default to the built-in implementation, 2021-11-30),\n>      +    supports pathspecs, so `git restore -p <pathspec>...` has worked for all\n>      +    users since then. I bisected to verify this was the commit that added\n>      +    support.\n>\n>           Signed-off-by: Adam Johnson <me@adamj.eu>\n\nYou clearly have addressed Junio's concern, and since the reasoning in the\ncommit message is valid and the diff is trivially correct, this patch\nshould be good to go.\n\nCiao,\nJohannes\n\n>\n>\n>\n>  Documentation/git-restore.txt | 3 ---\n>  1 file changed, 3 deletions(-)\n>\n> diff --git a/Documentation/git-restore.txt b/Documentation/git-restore.txt\n> index 5964810caa4..d31a06a673e 100644\n> --- a/Documentation/git-restore.txt\n> +++ b/Documentation/git-restore.txt\n> @@ -51,9 +51,6 @@ leave out at most one of `A` and `B`, in which case it defaults to `HEAD`.\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>\n> base-commit: f285f68a132109c234d93490671c00218066ace9\n> --\n> gitgitgadget\n>\n"},{"id":"514441","messageId":"xmqq5xk78g02.fsf@gitster.g","threadId":"59697","inReplyTo":"8c8da3d4-5184-f83c-c08c-51805fe9ca99@gmx.de","subject":"Re: [PATCH v2] doc: restore: remove note on --patch w/ pathspecs","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2025-03-17T22:11:09Z","receivedAt":"2025-03-17T22:11:12Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n\n> Hi Adam,\n> ...\n> commit message is valid and the diff is trivially correct, this patch\n> should be good to go.\n>\n> Ciao,\n> Johannes\n\nThanks, both.  Will queue.\n"}]}