rev-parse: add --prefix option
authorJohn Keeping <john@keeping.me.uk>
Sun, 16 Jun 2013 14:18:17 +0000 (15:18 +0100)
committerJunio C Hamano <gitster@pobox.com>
Mon, 17 Jun 2013 20:30:01 +0000 (13:30 -0700)
This makes 'git rev-parse' behave as if it were invoked from the
specified subdirectory of a repository, with the difference that any
file paths which it prints are prefixed with the full path from the top
of the working tree.

This is useful for shell scripts where we may want to cd to the top of
the working tree but need to handle relative paths given by the user on
the command line.

Signed-off-by: John Keeping <john@keeping.me.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
No differences found