git-fetch: make it work from within a subdirectory.
[gitweb.git] / git-commit.sh
index 81c3a0cb6152b02ccdcaed607efcd500813ce607..05828bb113d715a1067838ed2ac58ad8db06bf34 100755 (executable)
@@ -350,19 +350,9 @@ t,)
                        refuse_partial "Cannot do a partial commit during a merge."
                fi
                TMP_INDEX="$GIT_DIR/tmp-index$$"
-               if test -z "$initial_commit"
-               then
-                       # make sure index is clean at the specified paths, or
-                       # they are additions.
-                       dirty_in_index=`git-diff-index --cached --name-status \
-                               --diff-filter=DMTU HEAD -- "$@"`
-                       test -z "$dirty_in_index" ||
-                       refuse_partial "Different in index and the last commit:
-$dirty_in_index"
-               fi
                commit_only=`git-ls-files --error-unmatch -- "$@"` || exit
 
-               # Build the temporary index and update the real index
+               # Build a temporary index and update the real index
                # the same way.
                if test -z "$initial_commit"
                then
@@ -629,4 +619,7 @@ if test -x "$GIT_DIR"/hooks/post-commit && test "$ret" = 0
 then
        "$GIT_DIR"/hooks/post-commit
 fi
+
+test "$ret" = 0 && git-diff-tree --summary --root --no-commit-id HEAD
+
 exit "$ret"