Merge branch 'master' into js/diff-ni
[gitweb.git] / git-commit.sh
index cfa15110f6d7b11c7f778a3ef7ebbc034ce4d877..be3677c2049dca4deb35403804d5ea2d72254e7d 100755 (executable)
@@ -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 &&