diff options
author | Ronnie Sahlberg <sahlberg@google.com> | 2014-11-07 11:39:05 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2014-11-07 15:46:24 -0800 |
commit | 1831cf12154a830496e0de70eaaaeb260f465b82 (patch) | |
tree | 23f73d29ca7b7e7b0634d3845f5a6948a1bc8647 /refs.c | |
parent | 0635b55834b9034d917cb7d70d94b1b7da1453ec (diff) | |
download | git-rs/ref-transaction-rename.tar.gz |
refs.c: add an err argument to pack_refsrs/ref-transaction-rename
Signed-off-by: Ronnie Sahlberg <sahlberg@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'refs.c')
-rw-r--r-- | refs.c | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -2593,16 +2593,15 @@ static void prune_refs(struct ref_to_prune *r) } } -int pack_refs(unsigned int flags) +int pack_refs(unsigned int flags, struct strbuf *err) { struct pack_refs_cb_data cbdata; - struct strbuf err = STRBUF_INIT; memset(&cbdata, 0, sizeof(cbdata)); cbdata.flags = flags; - if (lock_packed_refs(&err)) - die("%s", err.buf); + if (lock_packed_refs(err)) + return -1; cbdata.packed_refs = get_packed_refs(&ref_cache); |