From: Junio C Hamano <gitster@pobox.com>
To: Eric Sunshine <sunshine@sunshineco.com>
Cc: Dietrich Epp <depp@moria.us>, Git List <git@vger.kernel.org>
Subject: Re: git rm --pathspec-from-file does not work in subdirectories
Date: Fri, 28 May 2021 14:56:59 +0900 [thread overview]
Message-ID: <xmqqh7in7650.fsf@gitster.g> (raw)
In-Reply-To: <CAPig+cT6ztfUYjbsfFmYZ=UOcyk=9rFKqEuE=EE4y2rdBftGag@mail.gmail.com> (Eric Sunshine's message of "Fri, 28 May 2021 01:08:41 -0400")
Eric Sunshine <sunshine@sunshineco.com> writes:
> On Fri, May 28, 2021 at 1:07 AM Junio C Hamano <gitster@pobox.com> wrote:
>> I wonder if the attached patch would make both issues better.
>
> The "attached patch" is missing.
Heh. Something along this line, but I think pathspec-from-file
still needs a bit more work even with this patch.
builtin/rm.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git c/builtin/rm.c w/builtin/rm.c
index 8a24c715e0..a4a8a1ad8d 100644
--- c/builtin/rm.c
+++ w/builtin/rm.c
@@ -265,7 +265,7 @@ int cmd_rm(int argc, const char **argv, const char *prefix)
builtin_rm_usage, 0);
parse_pathspec(&pathspec, 0,
- PATHSPEC_PREFER_CWD,
+ PATHSPEC_PREFER_FULL,
prefix, argv);
if (pathspec_from_file) {
@@ -273,7 +273,7 @@ int cmd_rm(int argc, const char **argv, const char *prefix)
die(_("--pathspec-from-file is incompatible with pathspec arguments"));
parse_pathspec_file(&pathspec, 0,
- PATHSPEC_PREFER_CWD,
+ PATHSPEC_PREFER_FULL,
prefix, pathspec_from_file, pathspec_file_nul);
} else if (pathspec_file_nul) {
die(_("--pathspec-file-nul requires --pathspec-from-file"));
prev parent reply other threads:[~2021-05-28 5:57 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-28 4:20 git rm --pathspec-from-file does not work in subdirectories Dietrich Epp
2021-05-28 4:59 ` Junio C Hamano
2021-05-28 5:08 ` Eric Sunshine
2021-05-28 5:56 ` Junio C Hamano [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=xmqqh7in7650.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=depp@moria.us \
--cc=git@vger.kernel.org \
--cc=sunshine@sunshineco.com \
/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 NNTP newsgroup(s).