Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
remove_lock_file(): call rollback_lock_file()
author
Michael Haggerty
<mhagger@alum.mit.edu>
Wed, 1 Oct 2014 10:28:19 +0000
(12:28 +0200)
committer
Junio C Hamano
<gitster@pobox.com>
Wed, 1 Oct 2014 20:45:12 +0000
(13:45 -0700)
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>
lockfile.c
patch
|
blob
|
history
raw
|
patch
| inline |
side by side
(parent:
e31e949
)
diff --git
a/lockfile.c
b/lockfile.c
index a8f32e5495d8b064e921e73fa4268f11d19b1c2b..f8205f6b03b0e25a580d7b0d5b3d79caf4db53e8 100644
(file)
--- 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;
}
}