]> git.ipfire.org Git - thirdparty/git.git/commit - config.c
config.c: handle lock file in error case in git_config_rename_...
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>
Tue, 20 Dec 2016 09:48:36 +0000 (16:48 +0700)
committerJunio C Hamano <gitster@pobox.com>
Thu, 22 Dec 2016 20:31:50 +0000 (12:31 -0800)
commitc06fa62dfc9c882f60250e60ad91fbb6a7e6f8e7
treedb3221f8e8998ec4302bd797fa6af89de65efe8a
parent6e45b43fa9c17124c5aea03b3fd6563cf03bae07
config.c: handle lock file in error case in git_config_rename_...

We could rely on atexit() to clean up everything, but let's be
explicit when we can. And it's good anyway because the function is
called the second time in the same process, we're in trouble.

This function should not affect the successful case because after
commit_lock_file() is called, rollback_lock_file() becomes no-op,
as long as it is initialized.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
config.c