From db7516ab9f435e3ce86b257c6631fb4d2dfb12ae Mon Sep 17 00:00:00 2001 From: Ronnie Sahlberg Date: Wed, 30 Apr 2014 12:22:42 -0700 Subject: 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 Signed-off-by: Jonathan Nieder Signed-off-by: Junio C Hamano --- fast-import.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'fast-import.c') diff --git a/fast-import.c b/fast-import.c index fee7906e5..d0bd285a1 100644 --- a/fast-import.c +++ b/fast-import.c @@ -1716,8 +1716,8 @@ static int update_branch(struct branch *b) transaction = ref_transaction_begin(&err); if (!transaction || ref_transaction_update(transaction, b->name, b->sha1, old_sha1, - 0, 1, &err) || - ref_transaction_commit(transaction, msg, &err)) { + 0, 1, msg, &err) || + ref_transaction_commit(transaction, &err)) { ref_transaction_free(transaction); error("%s", err.buf); strbuf_release(&err); @@ -1757,12 +1757,12 @@ static void dump_tags(void) strbuf_addf(&ref_name, "refs/tags/%s", t->name); if (ref_transaction_update(transaction, ref_name.buf, t->sha1, - NULL, 0, 0, &err)) { + NULL, 0, 0, msg, &err)) { failure |= error("%s", err.buf); goto cleanup; } } - if (ref_transaction_commit(transaction, msg, &err)) + if (ref_transaction_commit(transaction, &err)) failure |= error("%s", err.buf); cleanup: -- cgit v1.2.1