From: Christian Couder Date: Fri, 24 Apr 2009 06:29:01 +0000 (+0200) Subject: am: simplify "sq" function by using "git rev-parse --sq-quote" X-Git-Tag: v1.6.4-rc0~24^2~20 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=47c9739e5e02484de618ca70a592ecd25c05fd1a;p=git.git am: simplify "sq" function by using "git rev-parse --sq-quote" Signed-off-by: Christian Couder Signed-off-by: Junio C Hamano --- diff --git a/git-am.sh b/git-am.sh index 6d1848b6c..578780be1 100755 --- a/git-am.sh +++ b/git-am.sh @@ -44,11 +44,7 @@ else fi sq () { - for sqarg - do - printf "%s" "$sqarg" | - sed -e 's/'\''/'\''\\'\'''\''/g' -e 's/.*/ '\''&'\''/' - done + git rev-parse --sq-quote "$@" } stop_here () {