summaryrefslogtreecommitdiff
path: root/builtin/receive-pack.c
diff options
context:
space:
mode:
authorLibravatar Ronnie Sahlberg <sahlberg@google.com>2014-04-30 12:22:42 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2014-10-15 10:47:22 -0700
commitdb7516ab9f435e3ce86b257c6631fb4d2dfb12ae (patch)
tree84b452b76a6315511691d30f7e97a2a9388b25c1 /builtin/receive-pack.c
parentrefs.c: add an err argument to delete_ref_loose (diff)
downloadtgif-db7516ab9f435e3ce86b257c6631fb4d2dfb12ae.tar.xz
refs.c: pass the ref log message to _create/delete/update instead of _commit
Change the ref transaction API so that we pass the reflog message to the create/delete/update functions instead of to ref_transaction_commit. This allows different reflog messages for each ref update in a multi-ref transaction. Signed-off-by: Ronnie Sahlberg <sahlberg@google.com> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/receive-pack.c')
-rw-r--r--builtin/receive-pack.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/builtin/receive-pack.c b/builtin/receive-pack.c
index f2f6c67359..df6c337d69 100644
--- a/builtin/receive-pack.c
+++ b/builtin/receive-pack.c
@@ -842,8 +842,9 @@ static const char *update(struct command *cmd, struct shallow_info *si)
transaction = ref_transaction_begin(&err);
if (!transaction ||
ref_transaction_update(transaction, namespaced_name,
- new_sha1, old_sha1, 0, 1, &err) ||
- ref_transaction_commit(transaction, "push", &err)) {
+ new_sha1, old_sha1, 0, 1, "push",
+ &err) ||
+ ref_transaction_commit(transaction, &err)) {
ref_transaction_free(transaction);
rp_error("%s", err.buf);