diff options
author | Michael Haggerty <mhagger@alum.mit.edu> | 2015-05-11 17:25:20 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2015-05-11 20:50:20 +0200 |
commit | c628edfddbf37eefab810a3107a2c32b45abaedc (patch) | |
tree | ba037318198d2fc30e4c2ffb25ce8eaee1d79938 /refs.c | |
parent | ref_transaction_commit(): delete extra "the" from error message (diff) | |
download | git-c628edfddbf37eefab810a3107a2c32b45abaedc.tar.xz git-c628edfddbf37eefab810a3107a2c32b45abaedc.zip |
reflog_expire(): integrate lock_ref_sha1_basic() errors into ours
Now that lock_ref_sha1_basic() gives us back its error messages via a
strbuf, incorporate its error message into our error message rather
than emitting two separate error messages.
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Diffstat (limited to 'refs.c')
-rw-r--r-- | refs.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -4118,9 +4118,9 @@ int reflog_expire(const char *refname, const unsigned char *sha1, */ lock = lock_ref_sha1_basic(refname, sha1, NULL, NULL, 0, &type, &err); if (!lock) { - error("%s", err.buf); + error("cannot lock ref '%s': %s", refname, err.buf); strbuf_release(&err); - return error("cannot lock ref '%s'", refname); + return -1; } if (!reflog_exists(refname)) { unlock_ref(lock); |