Fix 'git commit -a' in a newly initialized repository
With current git: $ git init $ git commit -a cp: cannot stat `.git/index': No such file or directory Output a nice error message instead. Signed-off-by: Fredrik Kuivinen <frekui@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
parent
4917d2a66e
commit
755b99d815
@ -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 &&
|
||||
|
Loading…
Reference in New Issue
Block a user