git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* Fwd: Path instead of pathspec for “git checkout <tree-ish> [--] <pathspec>”
       [not found] <CA+oNJz+N_b6Gq-gVu0ZnGbL_ppdu0LDSfqPJjsV8QAghrS1Rkg@mail.gmail.com>
@ 2019-09-11  8:11 ` Bogdan Butnaru
  0 siblings, 0 replies; only message in thread
From: Bogdan Butnaru @ 2019-09-11  8:11 UTC (permalink / raw)
  To: git

Hello!

Not sure if I’m doing something wrong here, but it seems that when
calling “git checkout <tree-ish> [--] <pathspec>”, the last argument
is not interpreted correctly.

I have a repository that contains a multi-module Maven project, and as
such it contains several “pom.xml” files, one in the root directory
and a few others in sub-directories. If I understand correctly the
documentation, calling “git checkout 0123abcdef -- :/**pom.xml” should
checkout (to the working tree and the index) all files named “pom.xml”
from revision 0123abcdef. As of version 2.23.0.windows.1 it only
checks out the “pom.xml” file from the root of the repository.

However, if I run “git checkout --patch 0123abcdef -- :/**pom.xml”,
then during the interactive process I am asked about changes from all
“pom.xml” files, everywhere in the directory hierarchy. (The short
form “-p” also works.) If I just type “a” at every prompt, I get what
I expected from the first command, i.e. all matching files in the
given revision.

(I just tested that version now because it’s the newest I can find.
But the issue happens since at least 2.20, probably earlier.)

Cheers,
—Bogdan Butnaru

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2019-09-11  8:11 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CA+oNJz+N_b6Gq-gVu0ZnGbL_ppdu0LDSfqPJjsV8QAghrS1Rkg@mail.gmail.com>
2019-09-11  8:11 ` Fwd: Path instead of pathspec for “git checkout <tree-ish> [--] <pathspec>” Bogdan Butnaru

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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).