mirror of
https://github.com/git-for-windows/git.git
synced 2025-12-12 15:59:24 -06:00
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>
This commit is contained in:
parent
e31e949b9f
commit
a1754bcce9
@ -53,12 +53,8 @@ static void remove_lock_file(void)
|
|||||||
pid_t me = getpid();
|
pid_t me = getpid();
|
||||||
|
|
||||||
while (lock_file_list) {
|
while (lock_file_list) {
|
||||||
if (lock_file_list->owner == me &&
|
if (lock_file_list->owner == me)
|
||||||
lock_file_list->filename[0]) {
|
rollback_lock_file(lock_file_list);
|
||||||
if (lock_file_list->fd >= 0)
|
|
||||||
close(lock_file_list->fd);
|
|
||||||
unlink_or_warn(lock_file_list->filename);
|
|
||||||
}
|
|
||||||
lock_file_list = lock_file_list->next;
|
lock_file_list = lock_file_list->next;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user