Skip to content

Commit 47c9739

Browse files
chriscoolgitster
authored andcommitted
am: simplify "sq" function by using "git rev-parse --sq-quote"
Signed-off-by: Christian Couder <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent de52f5a commit 47c9739

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

git-am.sh

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,7 @@ else
4444
fi
4545

4646
sq () {
47-
for sqarg
48-
do
49-
printf "%s" "$sqarg" |
50-
sed -e 's/'\''/'\''\\'\'''\''/g' -e 's/.*/ '\''&'\''/'
51-
done
47+
git rev-parse --sq-quote "$@"
5248
}
5349

5450
stop_here () {

0 commit comments

Comments
 (0)