diff options
author | Ronnie Sahlberg <sahlberg@google.com> | 2014-04-30 12:22:42 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2014-10-15 10:47:22 -0700 |
commit | db7516ab9f435e3ce86b257c6631fb4d2dfb12ae (patch) | |
tree | 84b452b76a6315511691d30f7e97a2a9388b25c1 /walker.c | |
parent | dbdcac7d5c5eea314ec4c318a5e88cff427e9f0e (diff) | |
download | git-db7516ab9f435e3ce86b257c6631fb4d2dfb12ae.tar.gz |
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 'walker.c')
-rw-r--r-- | walker.c | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -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; } |