{"thread":{"id":"51828","subject":"Fwd: Path instead of pathspec for “git checkout <tree-ish> [--] <pathspec>”","startedAt":"2019-09-11T08:11:20Z","lastAt":"2019-09-11T08:11:20Z","messageCount":1,"participants":["Bogdan Butnaru"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"382154","messageId":"CA+oNJzKoQ-PmwY=p2W5HhCk1qn-BCwAKMZzZUn_7p2GVi-r9=w@mail.gmail.com","threadId":"51828","inReplyTo":"CA+oNJz+N_b6Gq-gVu0ZnGbL_ppdu0LDSfqPJjsV8QAghrS1Rkg@mail.gmail.com","subject":"Fwd: Path instead of pathspec for “git checkout <tree-ish> [--] <pathspec>”","fromName":"Bogdan Butnaru","fromEmail":"bbutnaru@qotilabs.com","sentAt":"2019-09-11T08:11:03Z","receivedAt":"2019-09-11T08:11:20Z","isPatch":false,"sender":{"key":"bbutnaru@qotilabs.com","avatar":null},"body":"Hello!\n\nNot sure if I’m doing something wrong here, but it seems that when\ncalling “git checkout <tree-ish> [--] <pathspec>”, the last argument\nis not interpreted correctly.\n\nI have a repository that contains a multi-module Maven project, and as\nsuch it contains several “pom.xml” files, one in the root directory\nand a few others in sub-directories. If I understand correctly the\ndocumentation, calling “git checkout 0123abcdef -- :/**pom.xml” should\ncheckout (to the working tree and the index) all files named “pom.xml”\nfrom revision 0123abcdef. As of version 2.23.0.windows.1 it only\nchecks out the “pom.xml” file from the root of the repository.\n\nHowever, if I run “git checkout --patch 0123abcdef -- :/**pom.xml”,\nthen during the interactive process I am asked about changes from all\n“pom.xml” files, everywhere in the directory hierarchy. (The short\nform “-p” also works.) If I just type “a” at every prompt, I get what\nI expected from the first command, i.e. all matching files in the\ngiven revision.\n\n(I just tested that version now because it’s the newest I can find.\nBut the issue happens since at least 2.20, probably earlier.)\n\nCheers,\n—Bogdan Butnaru\n"}]}