Re: [PATCH 1/2] rev-parse: add --filename-prefix option

2013-04-08 Thread Junio C Hamano
John Keeping writes: > On Mon, Apr 08, 2013 at 08:07:32AM -0700, Junio C Hamano wrote: >> John Keeping writes: >> >> > Yes (ish), the intended usage is something like this: >> > >> > prefix=$(git rev-parse --show-prefix) >> > cd_to_toplevel >> > ... parse options here ... >> > #

Re: [PATCH 1/2] rev-parse: add --filename-prefix option

2013-04-08 Thread John Keeping
On Mon, Apr 08, 2013 at 08:07:32AM -0700, Junio C Hamano wrote: > John Keeping writes: > > > Yes (ish), the intended usage is something like this: > > > > prefix=$(git rev-parse --show-prefix) > > cd_to_toplevel > > ... parse options here ... > > # Convert remaining arguments (fil

Re: [PATCH 1/2] rev-parse: add --filename-prefix option

2013-04-08 Thread Junio C Hamano
John Keeping writes: > Yes (ish), the intended usage is something like this: > > prefix=$(git rev-parse --show-prefix) > cd_to_toplevel > ... parse options here ... > # Convert remaining arguments (filenames) into top-level paths: > eval "set $(git rev-parse --prefix "$prefix"

Re: [PATCH 1/2] rev-parse: add --filename-prefix option

2013-04-08 Thread John Keeping
On Sun, Apr 07, 2013 at 03:14:58PM -0700, Jonathan Nieder wrote: > John Keeping wrote: > > > This adds a prefix string to any filename arguments encountered after it > > has been specified. > > I assume this is a way of passing the prefix in? In that case, I > think a good UI would be > >

Re: [PATCH 1/2] rev-parse: add --filename-prefix option

2013-04-07 Thread Jonathan Nieder
Hi, John Keeping wrote: > This adds a prefix string to any filename arguments encountered after it > has been specified. I assume this is a way of passing the prefix in? In that case, I think a good UI would be git rev-parse --prefix=Documentation/ That sounds like a useful thing and

[PATCH 1/2] rev-parse: add --filename-prefix option

2013-04-07 Thread John Keeping
This adds a prefix string to any filename arguments encountered after it has been specified. Signed-off-by: John Keeping --- builtin/rev-parse.c | 17 - 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/builtin/rev-parse.c b/builtin/rev-parse.c index f267a1d..11501a4