Re: Relative ls-files
From: Junio C Hamano <hidden>
Date: 2016-06-15 22:50:51
Martin Langhoff [off-list ref] writes:
On Wed, Mar 23, 2011 at 10:09 AM, Junio C Hamano [off-list ref] wrote:quoted
Because --with-tree nor ls-files is the tool that was designed for. If you want to find out about a branch, why aren't you using "ls-tree -r"?Thanks! Tab-completion wasn't showing it, so I never saw it.
Going back to your original (which I suspect may be different from John Tapsell's original): - is this file in branch foo? - has this file moved in branch foo? - what files with extension .zoo exist in branch foo? I am not sure what the difference between the first two question, but the most direct way the scripted Porcelains do to answer these questions is: git rev-parse --verify "foo:$the_path" The third question can be answered by listing paths in branch 'foo' and looking for .zoo, like so: git ls-tree -r --name-only --full-tree foo | grep '\.zoo$'