git@vger.kernel.org list mirror (unofficial, one of many)
 help / color / 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, back to index

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

git@vger.kernel.org list mirror (unofficial, one of many)

Archives are clonable:
	git clone --mirror https://public-inbox.org/git
	git clone --mirror http://ou63pmih66umazou.onion/git
	git clone --mirror http://czquwvybam4bgbro.onion/git
	git clone --mirror http://hjrcffqmbrq6wope.onion/git

Newsgroups are available over NNTP:
	nntp://news.public-inbox.org/inbox.comp.version-control.git
	nntp://ou63pmih66umazou.onion/inbox.comp.version-control.git
	nntp://czquwvybam4bgbro.onion/inbox.comp.version-control.git
	nntp://hjrcffqmbrq6wope.onion/inbox.comp.version-control.git
	nntp://news.gmane.org/gmane.comp.version-control.git

 note: .onion URLs require Tor: https://www.torproject.org/

AGPL code for this site: git clone https://public-inbox.org/ public-inbox