From b4fb09e4da53bfc6c720337142af5db3204736d5 Mon Sep 17 00:00:00 2001 From: Michael Haggerty Date: Mon, 10 Aug 2015 11:47:39 +0200 Subject: lockfile: add accessor get_lock_file_path() Signed-off-by: Michael Haggerty Signed-off-by: Junio C Hamano --- refs.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'refs.c') diff --git a/refs.c b/refs.c index 0f49a6210c..bf68015b5d 100644 --- a/refs.c +++ b/refs.c @@ -3184,7 +3184,7 @@ static int write_ref_to_lockfile(struct ref_lock *lock, write_in_full(fd, &term, 1) != 1 || close_ref(lock) < 0) { int save_errno = errno; - error("Couldn't write %s", lock->lk->filename.buf); + error("Couldn't write %s", get_lock_file_path(lock->lk)); unlock_ref(lock); errno = save_errno; return -1; @@ -4241,7 +4241,7 @@ int reflog_expire(const char *refname, const unsigned char *sha1, cb.newlog = fdopen_lock_file(&reflog_lock, "w"); if (!cb.newlog) { error("cannot fdopen %s (%s)", - reflog_lock.filename.buf, strerror(errno)); + get_lock_file_path(&reflog_lock), strerror(errno)); goto failure; } } @@ -4271,7 +4271,7 @@ int reflog_expire(const char *refname, const unsigned char *sha1, write_str_in_full(get_lock_file_fd(lock->lk), "\n") != 1 || close_ref(lock) < 0)) { status |= error("couldn't write %s", - lock->lk->filename.buf); + get_lock_file_path(lock->lk)); rollback_lock_file(&reflog_lock); } else if (commit_lock_file(&reflog_lock)) { status |= error("unable to commit reflog '%s' (%s)", -- cgit v1.3