Code

post-receive-email: hooks.showrev: show how to include both web link and patch
[git.git] / git-am.sh
index 774383fb6893776fcd9454b080b7a8346e6b034d..578780be138b216dc89333e1fde87ddcb91e5e54 100755 (executable)
--- 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 () {
@@ -571,7 +567,7 @@ do
                        GIT_COMMITTER_DATE="$GIT_AUTHOR_DATE"
                        export GIT_COMMITTER_DATE
                fi &&
-               git commit-tree $tree ${parent:+-p $parent} <"$dotest/final-commit"
+               git commit-tree $tree ${parent:+-p} $parent <"$dotest/final-commit"
        ) &&
        git update-ref -m "$GIT_REFLOG_ACTION: $FIRSTLINE" HEAD $commit $parent ||
        stop_here $this