am --rebasing: get patch body from commit, not from mailbox
[gitweb.git] / git-am.sh
index f8b7a0cb602d2d2425f68f8c27338cc003b70f6b..ec8fde102cabc50bff43c8862cf001616636d4ad 100755 (executable)
--- a/git-am.sh
+++ b/git-am.sh
@@ -683,6 +683,7 @@ To restore the original branch and stop patching run \"\$cmdline --abort\"."
                        sed -e '1,/^$/d' >"$dotest/msg-clean"
                        echo "$commit" > "$dotest/original-commit"
                        get_author_ident_from_commit "$commit" > "$dotest/author-script"
+                       git diff-tree --root --binary "$commit" >"$dotest/patch"
                else
                        {
                                sed -n '/^Subject/ s/Subject: //p' "$dotest/info"