Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Haggerty <mhagger@alum.mit.edu>2014-10-01 14:28:19 +0400
committerJunio C Hamano <gitster@pobox.com>2014-10-02 00:45:12 +0400
commita1754bcce98fa57b9374440c2717ec1159ed8ffb (patch)
tree1d0deeed45bbc2b2f53acde7231db71c4815a529 /lockfile.c
parente31e949b9f9b5e6dcff42e2242cf1a6fb3686b91 (diff)
remove_lock_file(): call rollback_lock_file()
It does just what we need. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Reviewed-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'lockfile.c')
-rw-r--r--lockfile.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/lockfile.c b/lockfile.c
index a8f32e5495..f8205f6b03 100644
--- a/lockfile.c
+++ b/lockfile.c
@@ -53,12 +53,8 @@ static void remove_lock_file(void)
pid_t me = getpid();
while (lock_file_list) {
- if (lock_file_list->owner == me &&
- lock_file_list->filename[0]) {
- if (lock_file_list->fd >= 0)
- close(lock_file_list->fd);
- unlink_or_warn(lock_file_list->filename);
- }
+ if (lock_file_list->owner == me)
+ rollback_lock_file(lock_file_list);
lock_file_list = lock_file_list->next;
}
}