summaryrefslogtreecommitdiff
path: root/git-commit.sh
diff options
context:
space:
mode:
Diffstat (limited to 'git-commit.sh')
-rwxr-xr-xgit-commit.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/git-commit.sh b/git-commit.sh
index ec506d956f..476f4f18db 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 &&