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 --- walker.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'walker.c') diff --git a/walker.c b/walker.c index 18a67d33cb..f149371e71 100644 --- a/walker.c +++ b/walker.c @@ -300,14 +300,13 @@ int walker_fetch(struct walker *walker, int targets, char **target, strbuf_addf(&refname, "refs/%s", write_ref[i]); if (ref_transaction_update(transaction, refname.buf, &sha1[20 * i], NULL, 0, 0, + msg ? msg : "fetch (unknown)", &err)) { error("%s", err.buf); goto done; } } - if (ref_transaction_commit(transaction, - msg ? msg : "fetch (unknown)", - &err)) { + if (ref_transaction_commit(transaction, &err)) { error("%s", err.buf); goto done; } -- cgit v1.2.3