{"thread":{"id":"41960","subject":"Paths handled differently by diff and checkout","startedAt":"2016-04-07T20:55:16Z","lastAt":"2016-04-07T20:55:16Z","messageCount":1,"participants":["Constantin Weißer"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"282910","messageId":"146006251650.27005.6715475336032533932@localhost.localdomain","threadId":"41960","inReplyTo":null,"subject":"Paths handled differently by diff and checkout","fromName":"Constantin Weißer","fromEmail":"i7c@posteo.de","sentAt":"2016-04-07T20:55:16Z","receivedAt":"2016-04-07T20:55:16Z","isPatch":false,"sender":{"key":"i7c@posteo.de","avatar":null},"body":"Hi,\n\nsay I got a file called \"asdf\" somewhere in a subdirectory. I can do:\n\ngit diff other_branch -- \\*asdf\n\nand it will show me the diff *only* of that file (which is the only one\nthat matches), so it works as expected. But if I do on the other hand:\n\ngit checkout other_branch -- \\*asdf\n\nI get: error: pathspec '*asdf' did not match any file(s) known to git.\n\nwhich is not what I'm expecting. I figure this is due to the fact that\ndiff does not use parse_pathspec() but handles paths diffently (not\nsure though)? I'd kind of find it useful to be able to 'git checkout\nsome_branch -- \\*.txt' to get all differing text files from another\nbranch for example.\n\nCheers\nConstantin\n"}]}