author | Alex Riesen <raa.lkml@gmail.com> | |
Wed, 29 Apr 2009 21:22:56 +0000 (23:22 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Thu, 30 Apr 2009 01:37:41 +0000 (18:37 -0700) | ||
commit | 691f1a28bf57618d8b44a193b1d28013c858aba6 | |
tree | 7d404656089320d486f658d3f4c061cd13dff556 | tree | snapshot |
parent | fc71db39e0d75e8a403f36f3fecf4450886cd165 | commit | diff |
replace direct calls to unlink(2) with unlink_or_warn
This helps to notice when something's going wrong, especially on
systems which lock open files.
I used the following criteria when selecting the code for replacement:
- it was already printing a warning for the unlink failures
- it is in a function which already printing something or is
called from such a function
- it is in a static function, returning void and the function is only
called from a builtin main function (cmd_)
- it is in a function which handles emergency exit (signal handlers)
- it is in a function which is obvously cleaning up the lockfiles
Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This helps to notice when something's going wrong, especially on
systems which lock open files.
I used the following criteria when selecting the code for replacement:
- it was already printing a warning for the unlink failures
- it is in a function which already printing something or is
called from such a function
- it is in a static function, returning void and the function is only
called from a builtin main function (cmd_)
- it is in a function which handles emergency exit (signal handlers)
- it is in a function which is obvously cleaning up the lockfiles
Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
23 files changed:
builtin-apply.c | diff | blob | history | |
builtin-fetch-pack.c | diff | blob | history | |
builtin-prune-packed.c | diff | blob | history | |
builtin-prune.c | diff | blob | history | |
builtin-receive-pack.c | diff | blob | history | |
builtin-remote.c | diff | blob | history | |
builtin-rerere.c | diff | blob | history | |
builtin-tag.c | diff | blob | history | |
builtin-verify-tag.c | diff | blob | history | |
diff.c | diff | blob | history | |
entry.c | diff | blob | history | |
fast-import.c | diff | blob | history | |
http-push.c | diff | blob | history | |
http-walker.c | diff | blob | history | |
ll-merge.c | diff | blob | history | |
lockfile.c | diff | blob | history | |
pack-refs.c | diff | blob | history | |
refs.c | diff | blob | history | |
rerere.c | diff | blob | history | |
server-info.c | diff | blob | history | |
sha1_file.c | diff | blob | history | |
transport.c | diff | blob | history | |
unpack-trees.c | diff | blob | history |