X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=git-am.sh;h=51ea168e03b0d1e4a906f5f17ead431ca3884502;hb=42e2cba20466e50825c55d2642da72bf4f088040;hp=c562159a187c233412d1ce2187d46280df020563;hpb=f51248eb482a7a0feacb04d02119c94d35845975;p=git.git diff --git a/git-am.sh b/git-am.sh index c562159a..51ea168e 100755 --- a/git-am.sh +++ b/git-am.sh @@ -35,10 +35,10 @@ fall_back_3way () { mkdir "$dotest/patch-merge-tmp-dir" # First see if the patch records the index info that we can use. - if git-apply --show-index-info "$dotest/patch" \ + if git-apply -z --index-info "$dotest/patch" \ >"$dotest/patch-merge-index-info" 2>/dev/null && GIT_INDEX_FILE="$dotest/patch-merge-tmp-index" \ - git-update-index --index-info <"$dotest/patch-merge-index-info" && + git-update-index -z --index-info <"$dotest/patch-merge-index-info" && GIT_INDEX_FILE="$dotest/patch-merge-tmp-index" \ git-write-tree >"$dotest/patch-merge-base+" && # index has the base tree now. @@ -224,6 +224,7 @@ do GIT_AUTHOR_EMAIL="$(sed -n '/^Email/ s/Email: //p' "$dotest/info")" GIT_AUTHOR_DATE="$(sed -n '/^Date/ s/Date: //p' "$dotest/info")" SUBJECT="$(sed -n '/^Subject/ s/Subject: //p' "$dotest/info")" + export GIT_AUTHOR_NAME GIT_AUTHOR_EMAIL GIT_AUTHOR_DATE case "$keep_subject" in -k) SUBJECT="[PATCH] $SUBJECT" ;; esac if test '' != "$SIGNOFF"