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 --- refs.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'refs.h') diff --git a/refs.h b/refs.h index 2328f06e7..1a55cabb4 100644 --- a/refs.h +++ b/refs.h @@ -274,8 +274,8 @@ struct ref_transaction *ref_transaction_begin(struct strbuf *err); * The following functions add a reference check or update to a * ref_transaction. In all of them, refname is the name of the * reference to be affected. The functions make internal copies of - * refname, so the caller retains ownership of the parameter. flags - * can be REF_NODEREF; it is passed to update_ref_lock(). + * refname and msg, so the caller retains ownership of these parameters. + * flags can be REF_NODEREF; it is passed to update_ref_lock(). */ /* @@ -292,7 +292,7 @@ int ref_transaction_update(struct ref_transaction *transaction, const char *refname, const unsigned char *new_sha1, const unsigned char *old_sha1, - int flags, int have_old, + int flags, int have_old, const char *msg, struct strbuf *err); /* @@ -307,7 +307,7 @@ int ref_transaction_update(struct ref_transaction *transaction, int ref_transaction_create(struct ref_transaction *transaction, const char *refname, const unsigned char *new_sha1, - int flags, + int flags, const char *msg, struct strbuf *err); /* @@ -321,7 +321,7 @@ int ref_transaction_create(struct ref_transaction *transaction, int ref_transaction_delete(struct ref_transaction *transaction, const char *refname, const unsigned char *old_sha1, - int flags, int have_old, + int flags, int have_old, const char *msg, struct strbuf *err); /* @@ -330,7 +330,7 @@ int ref_transaction_delete(struct ref_transaction *transaction, * problem. */ int ref_transaction_commit(struct ref_transaction *transaction, - const char *msg, struct strbuf *err); + struct strbuf *err); /* * Free an existing transaction and all associated data. -- cgit v1.2.1