if [ "$common" == "$merge" ]; then
echo "Already up-to-date. Yeeah!"
+ rm -f -- "$GIT_DIR/ORIG_HEAD" "$GIT_DIR/MERGE_HEAD"
exit 0
fi
if [ "$common" == "$head" ]; then
git-read-tree -u -m $head $merge || exit 1
echo $merge > "$GIT_DIR"/HEAD
git-diff-tree -p ORIG_HEAD HEAD | git-apply --stat
+ rm -f -- "$GIT_DIR/ORIG_HEAD" "$GIT_DIR/MERGE_HEAD"
exit 0
fi
echo "Trying to merge $merge into $head"
echo "Committed merge $result_commit"
echo $result_commit > "$GIT_DIR"/HEAD
git-diff-tree -p $head $result_commit | git-apply --stat
-rm $GIT_DIR/ORIG_HEAD $GIT_DIR/MERGE_HEAD
+rm -f -- "$GIT_DIR/ORIG_HEAD" "$GIT_DIR/MERGE_HEAD"