More friendly message when locking the index fails.
Just saying that index.lock exists doesn't tell the user _what_ to do to fix the problem. We should give an indication that it's normally safe to delete index.lock after making sure git isn't running here. Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
b452cc16d8
commit
e43a6fd3e9
@ -742,8 +742,7 @@ int cmd_update_index(int argc, const char **argv, const char *prefix)
|
||||
if (newfd < 0) {
|
||||
if (refresh_flags & REFRESH_QUIET)
|
||||
exit(128);
|
||||
die("unable to create '%s.lock': %s",
|
||||
get_index_file(), strerror(lock_error));
|
||||
unable_to_lock_index_die(get_index_file(), lock_error);
|
||||
}
|
||||
if (write_cache(newfd, active_cache, active_nr) ||
|
||||
commit_locked_index(lock_file))
|
||||
|
Reference in New Issue
Block a user