diff --git a/git-am.sh b/git-am.sh
index b66173c0cd8e7908c1ac9ffc9c9a6a91160849a0..2514d07de2ea89598499a35e3e4a2fcc9096bbec 100755 (executable)
--- a/git-am.sh
+++ b/git-am.sh
mkdir "$dotest/patch-merge-tmp-dir"
# First see if the patch records the index info that we can use.
mkdir "$dotest/patch-merge-tmp-dir"
# First see if the patch records the index info that we can use.
- git apply -z --index-info "$dotest/patch" \
- >"$dotest/patch-merge-index-info" &&
- GIT_INDEX_FILE="$dotest/patch-merge-tmp-index" \
- git update-index -z --index-info <"$dotest/patch-merge-index-info" &&
+ git apply --build-fake-ancestor "$dotest/patch-merge-tmp-index" \
+ "$dotest/patch" &&
GIT_INDEX_FILE="$dotest/patch-merge-tmp-index" \
git write-tree >"$dotest/patch-merge-base+" ||
cannot_fallback "Repository lacks necessary blobs to fall back on 3-way merge."
GIT_INDEX_FILE="$dotest/patch-merge-tmp-index" \
git write-tree >"$dotest/patch-merge-base+" ||
cannot_fallback "Repository lacks necessary blobs to fall back on 3-way merge."
stop_here $this
fi
stop_here $this
fi
- echo
printf 'Applying %s\n' "$SUBJECT"
printf 'Applying %s\n' "$SUBJECT"
- echo
case "$resolved" in
'')
case "$resolved" in
'')
fi
tree=$(git write-tree) &&
fi
tree=$(git write-tree) &&
- echo Wrote tree $tree &&
parent=$(git rev-parse --verify HEAD) &&
commit=$(git commit-tree $tree -p $parent <"$dotest/final-commit") &&
parent=$(git rev-parse --verify HEAD) &&
commit=$(git commit-tree $tree -p $parent <"$dotest/final-commit") &&
- echo Committed: $commit &&
git update-ref -m "$GIT_REFLOG_ACTION: $SUBJECT" HEAD $commit $parent ||
stop_here $this
git update-ref -m "$GIT_REFLOG_ACTION: $SUBJECT" HEAD $commit $parent ||
stop_here $this
"$GIT_DIR"/hooks/post-applypatch
fi
"$GIT_DIR"/hooks/post-applypatch
fi
+ git gc --auto
+
go_next
done
go_next
done