aboutsummaryrefslogtreecommitdiff
path: root/builtin-update-index.c
diff options
context:
space:
mode:
authorMatthieu Moy <Matthieu.Moy@imag.fr>2009-02-19 13:54:18 +0100
committerJunio C Hamano <gitster@pobox.com>2009-02-19 23:22:57 -0800
commite43a6fd3e94888d76779ad79fb568ed180e5fcdf (patch)
tree10ebfaf701f9a4b8a0f9f72db9a33bda4c461653 /builtin-update-index.c
parentb452cc16d85ea9de7d3f15c83a917b5534a91120 (diff)
downloadgit-e43a6fd3e94888d76779ad79fb568ed180e5fcdf.tar.gz
git-e43a6fd3e94888d76779ad79fb568ed180e5fcdf.tar.xz
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>
Diffstat (limited to 'builtin-update-index.c')
-rw-r--r--builtin-update-index.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/builtin-update-index.c b/builtin-update-index.c
index 65d577510..daca0f775 100644
--- a/builtin-update-index.c
+++ b/builtin-update-index.c
@@ -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))