Re: [RFC 2/2] grep: use '/' delimiter for paths

2017-01-24 Thread Phil Hord
On Tue, Jan 24, 2017 at 1:54 AM Stefan Hajnoczi wrote: > > The use of "git show" you are demonstrating is still about showing > > the commit object, whose behaviour is defined to show the log > > message and the diff relative to its sole parent, limited to the > > paths that

Re: [RFC 2/2] grep: use '/' delimiter for paths

2017-01-24 Thread Stefan Hajnoczi
On Fri, Jan 20, 2017 at 02:56:26PM -0800, Junio C Hamano wrote: > Jeff King writes: > > > It's not ignored; just as with git-log, it's a pathspec to limit the > > diff. E.g.: > > > > $ git show --name-status v2.9.3 > > ... > > M Documentation/RelNotes/2.9.3.txt > > M

Re: [RFC 2/2] grep: use '/' delimiter for paths

2017-01-20 Thread Junio C Hamano
Jeff King writes: > It's not ignored; just as with git-log, it's a pathspec to limit the > diff. E.g.: > > $ git show --name-status v2.9.3 > ... > M Documentation/RelNotes/2.9.3.txt > M Documentation/git.txt > M GIT-VERSION-GEN > > $ git show

Re: [RFC 2/2] grep: use '/' delimiter for paths

2017-01-20 Thread Jeff King
On Fri, Jan 20, 2017 at 02:12:12PM +, Stefan Hajnoczi wrote: > I find : vs -- confusing: > > | : | -- > --+--+- > git grep | OK | OK > --+--+- >

Re: [RFC 2/2] grep: use '/' delimiter for paths

2017-01-20 Thread Stefan Hajnoczi
On Thu, Jan 19, 2017 at 10:29:34AM -0800, Brandon Williams wrote: > On 01/19, Stefan Hajnoczi wrote: > > If the tree contains a sub-directory then git-grep(1) output contains a > > colon character instead of a path separator: > > > > $ git grep malloc v2.9.3:t > > v2.9.3:t:test-lib.sh:

Re: [RFC 2/2] grep: use '/' delimiter for paths

2017-01-20 Thread Stefan Hajnoczi
On Thu, Jan 19, 2017 at 10:54:02AM -0800, Junio C Hamano wrote: > Stefan Hajnoczi writes: > > > If the tree contains a sub-directory then git-grep(1) output contains a > > colon character instead of a path separator: > > > > $ git grep malloc v2.9.3:t > >

Re: [RFC 2/2] grep: use '/' delimiter for paths

2017-01-19 Thread Brandon Williams
On 01/19, Stefan Hajnoczi wrote: > If the tree contains a sub-directory then git-grep(1) output contains a > colon character instead of a path separator: > > $ git grep malloc v2.9.3:t > v2.9.3:t:test-lib.sh: setup_malloc_check () { > $ git show v2.9.3:t:test-lib.sh > fatal: Path

Re: [RFC 2/2] grep: use '/' delimiter for paths

2017-01-19 Thread Junio C Hamano
Stefan Hajnoczi writes: > If the tree contains a sub-directory then git-grep(1) output contains a > colon character instead of a path separator: > > $ git grep malloc v2.9.3:t > v2.9.3:t:test-lib.sh: setup_malloc_check () { > $ git show v2.9.3:t:test-lib.sh >

[RFC 2/2] grep: use '/' delimiter for paths

2017-01-19 Thread Stefan Hajnoczi
If the tree contains a sub-directory then git-grep(1) output contains a colon character instead of a path separator: $ git grep malloc v2.9.3:t v2.9.3:t:test-lib.sh: setup_malloc_check () { $ git show v2.9.3:t:test-lib.sh fatal: Path 't:test-lib.sh' does not exist in 'v2.9.3' This patch