diff options
author | Michael Haggerty <mhagger@alum.mit.edu> | 2014-12-12 09:56:46 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2014-12-12 11:43:47 -0800 |
commit | f3b661f766c1525265d065fdd0529985979c80c6 (patch) | |
tree | ef98df2fc03daee9e9c897ae8eba40358eea3b68 /diff-lib.c | |
parent | expire_reflog(): return early if the reference has no reflog (diff) | |
download | tgif-f3b661f766c1525265d065fdd0529985979c80c6.tar.xz |
expire_reflog(): use a lock_file for rewriting the reflog file
We don't actually need the locking functionality, because we already
hold the lock on the reference itself, which is how the reflog file is
locked. But the lock_file code can do some of the bookkeeping for us,
and it is more careful than the old code here was. For example:
* It correctly handles the case that the reflog lock file already
exists for some reason or cannot be opened.
* It correctly cleans up the lockfile if the program dies.
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'diff-lib.c')
0 files changed, 0 insertions, 0 deletions