X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=git-commit.sh;h=cad16a5e868730dd56f79baf711aed138d7cafe1;hb=fd2a75972e90d34bc8d4bebe1d669645557a2192;hp=ec506d956fa2858897c53b35d28db8083b7fdcec;hpb=5bac4a671907604b5fb4e24ff682d5b0e8431931;p=git.git diff --git a/git-commit.sh b/git-commit.sh index ec506d956..cad16a5e8 100755 --- a/git-commit.sh +++ b/git-commit.sh @@ -318,6 +318,10 @@ esac case "$all,$also" in t,) + if test ! -f "$THIS_INDEX" + then + die 'nothing to commit (use "git add file1 file2" to include for commit)' + fi save_index && ( cd_to_toplevel && @@ -617,6 +621,9 @@ else fi ret="$?" rm -f "$GIT_DIR/COMMIT_MSG" "$GIT_DIR/COMMIT_EDITMSG" "$GIT_DIR/SQUASH_MSG" + +cd_to_toplevel + if test -d "$GIT_DIR/rr-cache" then git-rerere