Git Mailing List Archive mirror
 help / color / mirror / Atom feed
From: "Adam Johnson via GitGitGadget" <gitgitgadget@gmail.com>
To: git@vger.kernel.org
Cc: Johannes Schindelin <Johannes.Schindelin@gmx.de>,
	Junio C Hamano <gitster@pobox.com>, Adam Johnson <me@adamj.eu>,
	Adam Johnson <me@adamj.eu>
Subject: [PATCH v2] doc: restore: remove note on --patch w/ pathspecs
Date: Thu, 01 Jun 2023 21:14:57 +0000	[thread overview]
Message-ID: <pull.1504.v2.git.git.1685654097812.gitgitgadget@gmail.com> (raw)
In-Reply-To: <pull.1504.git.git.1683282753768.gitgitgadget@gmail.com>

From: Adam Johnson <me@adamj.eu>

This note was added with the restore command docs in 46e91b663b
(checkout: split part of it to new command 'restore', 2019-04-25), but it is
now inaccurate. The underlying builtin `add -i` implementation, made default
in 0527ccb1b5 (add -i: default to the built-in implementation, 2021-11-30),
supports pathspecs, so `git restore -p <pathspec>...` has worked for all
users since then. I bisected to verify this was the commit that added
support.

Signed-off-by: Adam Johnson <me@adamj.eu>
---
    doc: restore: remove note on --patch w/ pathspecs
    
    This note was added with the command in 46e91b663b, but it is now
    inaccurate. The underlying builtin add -i implementation, made default
    in 0527ccb1b5, does support pathspecs, so git restore -p <pathspec>...
    has worked for all users since then. I bisected to verify this.

Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-1504%2Fadamchainz%2Faj%2Fgit-restore-patch-docs-fix-v2
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-1504/adamchainz/aj/git-restore-patch-docs-fix-v2
Pull-Request: https://github.com/git/git/pull/1504

Range-diff vs v1:

 1:  784143b9949 ! 1:  556f4323ce6 doc: restore: remove note on --patch w/ pathspecs
     @@ Metadata
       ## Commit message ##
          doc: restore: remove note on --patch w/ pathspecs
      
     -    This note was added with the command in 46e91b663b (checkout: split part of
     -    it to new command 'restore', 2019-04-25), but it is now inaccurate. The
     -    underlying builtin `add -i` implementation, made default in 0527ccb1b5 (add
     -    -i: default to the built-in implementation, 2021-11-30), supports pathspecs,
     -    so `git restore -p <pathspec>...` has worked for all users since then. I
     -    bisected to verify this was the commit that added support.
     +    This note was added with the restore command docs in 46e91b663b
     +    (checkout: split part of it to new command 'restore', 2019-04-25), but it is
     +    now inaccurate. The underlying builtin `add -i` implementation, made default
     +    in 0527ccb1b5 (add -i: default to the built-in implementation, 2021-11-30),
     +    supports pathspecs, so `git restore -p <pathspec>...` has worked for all
     +    users since then. I bisected to verify this was the commit that added
     +    support.
      
          Signed-off-by: Adam Johnson <me@adamj.eu>
      


 Documentation/git-restore.txt | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/Documentation/git-restore.txt b/Documentation/git-restore.txt
index 5964810caa4..d31a06a673e 100644
--- a/Documentation/git-restore.txt
+++ b/Documentation/git-restore.txt
@@ -51,9 +51,6 @@ leave out at most one of `A` and `B`, in which case it defaults to `HEAD`.
 	restore source and the restore location. See the ``Interactive
 	Mode'' section of linkgit:git-add[1] to learn how to operate
 	the `--patch` mode.
-+
-Note that `--patch` can accept no pathspec and will prompt to restore
-all modified paths.
 
 -W::
 --worktree::

base-commit: f285f68a132109c234d93490671c00218066ace9
-- 
gitgitgadget

      parent reply	other threads:[~2023-06-01 21:15 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-05 10:32 [PATCH] doc: restore: remove note on --patch w/ pathspecs Adam Johnson via GitGitGadget
2023-05-25  7:25 ` Adam Johnson
2023-06-01  5:09   ` Junio C Hamano
2023-06-01 21:14 ` Adam Johnson via GitGitGadget [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=pull.1504.v2.git.git.1685654097812.gitgitgadget@gmail.com \
    --to=gitgitgadget@gmail.com \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=me@adamj.eu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).