]> git.ipfire.org Git - thirdparty/git.git/commit - lockfile.c
commit_lock_file(): rollback lock file on failure to rename
authorMichael Haggerty <mhagger@alum.mit.edu>
Wed, 1 Oct 2014 10:28:23 +0000 (12:28 +0200)
committerJunio C Hamano <gitster@pobox.com>
Wed, 1 Oct 2014 20:45:14 +0000 (13:45 -0700)
commit1b1648f46bcb638f558e9cbd2d0e89066c89c44e
tree47a9ea458b4b3a3f460ddacf79934fe88c016ebd
parent8e86c155d2962f5dff83c9d0d88b836bf040c1fa
commit_lock_file(): rollback lock file on failure to rename

If rename() fails, call rollback_lock_file() to delete the lock file
(in case it is still present) and reset the filename field to the
empty string so that the lockfile object is left in a valid state.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
lockfile.c