diff --git a/git-commit.sh b/git-commit.sh
index ec506d956fa2858897c53b35d28db8083b7fdcec..cad16a5e868730dd56f79baf711aed138d7cafe1 100755 (executable)
--- a/git-commit.sh
+++ b/git-commit.sh
case "$all,$also" in
t,)
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 &&
save_index &&
(
cd_to_toplevel &&
fi
ret="$?"
rm -f "$GIT_DIR/COMMIT_MSG" "$GIT_DIR/COMMIT_EDITMSG" "$GIT_DIR/SQUASH_MSG"
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
if test -d "$GIT_DIR/rr-cache"
then
git-rerere