esac
if [ -f "$GIT_DIR/MERGE_HEAD" ]; then
+
+ test -f "$GIT_DIR/MERGE_MSG" && cat "$GIT_DIR/MERGE_MSG"
+
echo "#"
echo "# It looks like your may be committing a MERGE."
echo "# If this is not correct, please remove the file"
use_strategies=
dropsave() {
- rm -f -- "$GIT_DIR/MERGE_HEAD" \
+ rm -f -- "$GIT_DIR/MERGE_HEAD" "$GIT_DIR/MERGE_MSG" \
"$GIT_DIR/MERGE_SAVE" || exit 1
}
}
restorestate() {
- git reset --hard $head
- cpio -iuv <"$GIT_DIR/MERGE_SAVE"
- git-update-index --refresh >/dev/null
+ if test -f "$GIT_DIR/MERGE_SAVE"
+ then
+ git reset --hard $head
+ cpio -iuv <"$GIT_DIR/MERGE_SAVE"
+ git-update-index --refresh >/dev/null
+ fi
}
summary() {
single_strategy=no
;;
*)
+ rm -f "$GIT_DIR/MERGE_SAVE"
single_strategy=yes
;;
esac
do
echo $remote
done >"$GIT_DIR/MERGE_HEAD"
+echo $merge_msg >"$GIT_DIR/MERGE_MSG"
+
die "Automatic merge failed; fix up by hand"