diff options
author | Ronnie Sahlberg <sahlberg@google.com> | 2014-06-20 07:42:49 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2014-07-14 11:54:41 -0700 |
commit | 60bca085c893f1866829b55bfee63888943cfe14 (patch) | |
tree | 8da8f6f6eb32f72380035e6e14f369dd4d82c57d /builtin | |
parent | lockfile.c: make lock_file return a meaningful errno on failurei (diff) | |
download | tgif-60bca085c893f1866829b55bfee63888943cfe14.tar.xz |
refs.c: add an err argument to repack_without_refs
Update repack_without_refs to take an err argument and update it if there
is a failure. Pass the err variable from ref_transaction_commit to this
function so that callers can print a meaningful error message if _commit
fails due to this function.
Signed-off-by: Ronnie Sahlberg <sahlberg@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Acked-by: Michael Haggerty <mhagger@alum.mit.edu>
Diffstat (limited to 'builtin')
-rw-r--r-- | builtin/remote.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/builtin/remote.c b/builtin/remote.c index c9102e8fe9..401feb3970 100644 --- a/builtin/remote.c +++ b/builtin/remote.c @@ -755,7 +755,7 @@ static int remove_branches(struct string_list *branches) branch_names = xmalloc(branches->nr * sizeof(*branch_names)); for (i = 0; i < branches->nr; i++) branch_names[i] = branches->items[i].string; - result |= repack_without_refs(branch_names, branches->nr); + result |= repack_without_refs(branch_names, branches->nr, NULL); free(branch_names); for (i = 0; i < branches->nr; i++) { @@ -1333,7 +1333,8 @@ static int prune_remote(const char *remote, int dry_run) for (i = 0; i < states.stale.nr; i++) delete_refs[i] = states.stale.items[i].util; if (!dry_run) - result |= repack_without_refs(delete_refs, states.stale.nr); + result |= repack_without_refs(delete_refs, + states.stale.nr, NULL); free(delete_refs); } |