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>
This commit is contained in:

committed by
Junio C Hamano

parent
dbdcac7d5c
commit
db7516ab9f
@ -1811,8 +1811,8 @@ int cmd_commit(int argc, const char **argv, const char *prefix)
|
||||
ref_transaction_update(transaction, "HEAD", sha1,
|
||||
current_head
|
||||
? current_head->object.sha1 : NULL,
|
||||
0, !!current_head, &err) ||
|
||||
ref_transaction_commit(transaction, sb.buf, &err)) {
|
||||
0, !!current_head, sb.buf, &err) ||
|
||||
ref_transaction_commit(transaction, &err)) {
|
||||
rollback_index_files();
|
||||
die("%s", err.buf);
|
||||
}
|
||||
|
Reference in New Issue
Block a user