rev-parse doc: pass "--" to rev-parse in the --prefix example
The "--" argument avoids "ambiguous argument: unknown revision or path not in the working tree" errors when a pathname argument refers to a non-existent file. The "--" passed explicitly to set was removed because rev-parse outputs the "--" argument that it is given. Signed-off-by: Richard Hansen <hansenr@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
314caebe21
commit
11873b438f
@ -91,7 +91,8 @@ repository. For example:
|
||||
----
|
||||
prefix=$(git rev-parse --show-prefix)
|
||||
cd "$(git rev-parse --show-toplevel)"
|
||||
eval "set -- $(git rev-parse --sq --prefix "$prefix" "$@")"
|
||||
# rev-parse provides the -- needed for 'set'
|
||||
eval "set $(git rev-parse --sq --prefix "$prefix" -- "$@")"
|
||||
----
|
||||
|
||||
--verify::
|
||||
|
Loading…
Reference in New Issue
Block a user