am: simplify "sq" function by using "git rev-parse --sq-quote"

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Christian Couder 2009-04-24 08:29:01 +02:00 committed by Junio C Hamano
parent de52f5a806
commit 47c9739e5e

View file

@ -44,11 +44,7 @@ else
fi fi
sq () { sq () {
for sqarg git rev-parse --sq-quote "$@"
do
printf "%s" "$sqarg" |
sed -e 's/'\''/'\''\\'\'''\''/g' -e 's/.*/ '\''&'\''/'
done
} }
stop_here () { stop_here () {