diff options
author | Michael Haggerty <mhagger@alum.mit.edu> | 2015-05-01 14:25:58 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2015-05-10 11:31:33 -0700 |
commit | 01d0dd1b96d92c1d293f6c0303b6103df31209d1 (patch) | |
tree | 3f5126f203788b018fa6b0768ddf7a847c4d0b51 | |
parent | 7c774c30a135a728f34a7cf0076e0e65ba28f0c3 (diff) | |
download | git-01d0dd1b96d92c1d293f6c0303b6103df31209d1.tar.gz |
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>
-rw-r--r-- | refs.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -4146,9 +4146,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); |