]> asedeno.scripts.mit.edu Git - git.git/blobdiff - git-am.sh
Merge branch 'maint'
[git.git] / git-am.sh
index 6db9cb503a2717d0c45ee40e262747cbeba3ad17..88af8dd256ef871e8a35ec47df925db9b13b95f7 100755 (executable)
--- a/git-am.sh
+++ b/git-am.sh
@@ -66,7 +66,7 @@ fall_back_3way () {
     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+" ||
-    cannot_fallback "Patch does not record usable index information."
+    cannot_fallback "Repository lacks necessary blobs to fall back on 3-way merge."
 
     echo Using index info to reconstruct a base tree...
     if GIT_INDEX_FILE="$dotest/patch-merge-tmp-index" \
@@ -290,6 +290,10 @@ do
                git-mailinfo $keep $utf8 "$dotest/msg" "$dotest/patch" \
                        <"$dotest/$msgnum" >"$dotest/info" ||
                        stop_here $this
+               test -s $dotest/patch || {
+                       echo "Patch is empty.  Was is split wrong?"
+                       stop_here $this
+               }
                git-stripspace < "$dotest/msg" > "$dotest/msg-clean"
                ;;
        esac