Remove variables not needed when using poll
[git.git] / git-commit.sh
index 741444a..18ad361 100755 (executable)
@@ -94,13 +94,13 @@ esac
 case "$all,$#" in
 t,*)
        git-diff-files --name-only -z |
-       xargs -0 git-update-index -q --remove --
+       git-update-index --remove -z --stdin
        ;;
 ,0)
        ;;
 *)
        git-diff-files --name-only -z "$@" |
-       xargs -0 git-update-index -q --remove --
+       git-update-index --remove -z --stdin
        ;;
 esac || exit 1
 git-update-index -q --refresh || exit 1
@@ -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