[PATCH] Provide access to git_dir through get_git_dir().
[git.git] / git-commit.sh
index 741444a..9412840 100755 (executable)
@@ -141,6 +141,9 @@ t)
 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"
@@ -158,7 +161,7 @@ if [ ! -r "$GIT_DIR/HEAD" ]; then
        PARENTS=""
 else
        if [ -f "$GIT_DIR/MERGE_HEAD" ]; then
-               PARENTS="-p HEAD -p MERGE_HEAD"
+               PARENTS="-p HEAD "`sed -e 's/^/-p /' "$GIT_DIR/MERGE_HEAD"`
        fi
        if test "$use_commit" != ""
        then