[PATCH v2 31/43] refs.c: add method for initial ref transaction commit

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Ronnie Sahlberg <rsahlberg@xxxxxxxxxx>
Signed-off-by: David Turner <dturner@xxxxxxxxxxxxxxxx>
---
 refs-be-files.c | 5 +++--
 refs.c          | 6 ++++++
 refs.h          | 1 +
 3 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/refs-be-files.c b/refs-be-files.c
index 93a5a33..ea91afd 100644
--- a/refs-be-files.c
+++ b/refs-be-files.c
@@ -3517,8 +3517,8 @@ static int ref_present(const char *refname,
 	return string_list_has_string(affected_refnames, refname);
 }
 
-int initial_ref_transaction_commit(struct ref_transaction *transaction,
-				   struct strbuf *err)
+static int files_initial_transaction_commit(struct ref_transaction *transaction,
+					    struct strbuf *err)
 {
 	int ret = 0, i;
 	int n = transaction->nr;
@@ -3748,6 +3748,7 @@ struct ref_be refs_be_files = {
 	files_transaction_delete,
 	files_transaction_verify,
 	files_transaction_commit,
+	files_initial_transaction_commit,
 	files_transaction_free,
 	files_for_each_reflog_ent,
 	files_for_each_reflog_ent_reverse,
diff --git a/refs.c b/refs.c
index 96fa699..530edcf 100644
--- a/refs.c
+++ b/refs.c
@@ -1201,3 +1201,9 @@ int reflog_expire(const char *refname, const unsigned char *sha1,
 					       prepare_fn, should_prune_fn,
 					       cleanup_fn, policy_cb_data);
 }
+
+int initial_ref_transaction_commit(struct ref_transaction *transaction,
+				   struct strbuf *err)
+{
+	return the_refs_backend->initial_transaction_commit(transaction, err);
+}
diff --git a/refs.h b/refs.h
index 06089f8..bd46d0f 100644
--- a/refs.h
+++ b/refs.h
@@ -672,6 +672,7 @@ struct ref_be {
 	ref_transaction_delete_fn transaction_delete;
 	ref_transaction_verify_fn transaction_verify;
 	ref_transaction_commit_fn transaction_commit;
+	ref_transaction_commit_fn initial_transaction_commit;
 	ref_transaction_free_fn transaction_free;
 	for_each_reflog_ent_fn for_each_reflog_ent;
 	for_each_reflog_ent_reverse_fn for_each_reflog_ent_reverse;
-- 
2.4.2.644.g97b850b-twtrsrc

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]