diff options
author | Michael Haggerty <mhagger@alum.mit.edu> | 2015-08-10 11:47:39 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2015-08-10 12:57:14 -0700 |
commit | b4fb09e4da53bfc6c720337142af5db3204736d5 (patch) | |
tree | ee21234e6668f9a03d08d0713b3a27df4e3d444a /refs.c | |
parent | c99a4c2db3053e4fb6a43870f5c747f858b0f58f (diff) | |
download | git-b4fb09e4da53bfc6c720337142af5db3204736d5.tar.gz |
lockfile: add accessor get_lock_file_path()
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'refs.c')
-rw-r--r-- | refs.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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)", |