Am 10.01.2017 um 20:25 schrieb Junio C Hamano:
Johannes Sixt <j6t@xxxxxxxx> writes:
BTW, the --sq and eval business is not required here. At this point,
$IFS = $'\n', so
set -- $(git rev-parse --sq --prefix "$prefix" -- "$@")
will do. (Except that it would not detect errors.)
I thought you are suggesting not to use --sq but it is still there.
A copy-paste-p. Of course, I want to suggest not to use --sq.
Unrelated, but I notice that in this:
eval "set -- $(git rev-parse --sq --prefix "$prefix" -- "$@")"
shift
It is my fault but it is a roundabout way to say:
eval "set $(git rev-parse --sq --prefix "$prefix" -- "$@")"
Clever! But I fear that half a year down the road we will appreciate a
comment like
# rev-parse provides the -- needed for `set`
and then we are back at two lines, so I dunno...
-- Hannes