author | Junio C Hamano <junkio@cox.net> | |
Sat, 12 Aug 2006 08:03:47 +0000 (01:03 -0700) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Sun, 13 Aug 2006 00:08:25 +0000 (17:08 -0700) | ||
commit | 40aaae88adfe05be435b7bd17093d49869f3276f | |
tree | cbc2c6410884604c15a4301841b23e658cf2096a | tree | snapshot |
parent | fd7bcfb524a3313ef5361bdd8493ba50635f50f0 | commit | diff |
Better error message when we are unable to lock the index file
Most of the callers except the one in refs.c use the function to
update the index file. Among the index writers, everybody
except write-tree dies if they cannot open it for writing.
This gives the function an extra argument, to tell it to die
when it cannot create a new file as the lockfile.
The only caller that does not have to die is write-tree, because
updating the index for the cache-tree part is optional and not
being able to do so does not affect the correctness. I think we
do not have to be so careful and make the failure into die() the
same way as other callers, but that would be a different patch.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Most of the callers except the one in refs.c use the function to
update the index file. Among the index writers, everybody
except write-tree dies if they cannot open it for writing.
This gives the function an extra argument, to tell it to die
when it cannot create a new file as the lockfile.
The only caller that does not have to die is write-tree, because
updating the index for the cache-tree part is optional and not
being able to do so does not affect the correctness. I think we
do not have to be so careful and make the failure into die() the
same way as other callers, but that would be a different patch.
Signed-off-by: Junio C Hamano <junkio@cox.net>
builtin-add.c | diff | blob | history | |
builtin-apply.c | diff | blob | history | |
builtin-mv.c | diff | blob | history | |
builtin-read-tree.c | diff | blob | history | |
builtin-rm.c | diff | blob | history | |
builtin-update-index.c | diff | blob | history | |
builtin-write-tree.c | diff | blob | history | |
cache.h | diff | blob | history | |
checkout-index.c | diff | blob | history | |
lockfile.c | diff | blob | history | |
refs.c | diff | blob | history |