Thanks for looking into this!
Øystein Walle <[email protected]> writes:
> - REV=$(git rev-parse --quiet --symbolic --verify $1 2>/dev/null) || {
> + REV=$(git rev-parse --quiet --symbolic --verify "$1" 2>/dev/null) || {
> reference="$1"
It's somewhat ironic that the one place where the original did use
quoting is where it's actually not required.
> - i_commit=$(git rev-parse --quiet --verify $REV^2 2>/dev/null) &&
> - set -- $(git rev-parse $REV $REV^1 $REV: $REV^1: $REV^2: 2>/dev/null) &&
> + i_commit=$(git rev-parse --quiet --verify "$REV^2" 2>/dev/null) &&
> + set -- $(git rev-parse "$REV" "$REV^1" "$REV:" "$REV^1:" "$REV^2:"
> 2>/dev/null) &&
Thanks for being careful here.
I wonder what we would lose by dropping the --symbolic in the line I
quoted above (which is the second parsing pass), so that it resolves to
a SHA1. We would gain some robustness, as I'm not sure "$REV:" works
correctly in the face of weird revision expressions like ":/foo".
--
Thomas Rast
[email protected]
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html