refs.c: convert it to use lockfile interface.

This updates the ref locking code to use creat-rename locking
code we use for the index file, so that it can borrow the code
to clean things up upon signals and program termination.

Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
Junio C Hamano
2006-06-06 13:54:14 -07:00
parent 021b6e4549
commit c33d5174d6
2 changed files with 11 additions and 12 deletions

2
refs.h
View File

@ -3,8 +3,8 @@
struct ref_lock {
char *ref_file;
char *lock_file;
char *log_file;
struct lock_file *lk;
unsigned char old_sha1[20];
int lock_fd;
int force_write;