Thread (51 messages) flat view 51 messages, 6 authors, 2016-06-15
STALE3747d

Revision v6 of 3 in this series.

Revisions (3)
  1. v4 [diff vs current]
  2. v6 current
  3. v7 [diff vs current]

[PATCH v6 11/32] refs: add method for initial ref transaction commit

From: David Turner <hidden>
Date: 2016-06-15 23:08:25
Subsystem: the rest · Maintainer: Linus Torvalds

Signed-off-by: Ronnie Sahlberg <redacted>
Signed-off-by: David Turner <redacted>
---
 refs.c               | 6 ++++++
 refs/files-backend.c | 5 +++--
 refs/refs-internal.h | 1 +
 3 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/refs.c b/refs.c
index 9f06686..5ae1903 100644
--- a/refs.c
+++ b/refs.c
@@ -1396,3 +1396,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/files-backend.c b/refs/files-backend.c
index 5e44b10..7621a41 100644
--- a/refs/files-backend.c
+++ b/refs/files-backend.c
@@ -3203,8 +3203,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;
@@ -3428,6 +3428,7 @@ struct ref_storage_be refs_be_files = {
 	NULL,
 	"files",
 	files_transaction_commit,
+	files_initial_transaction_commit,
 
 	files_for_each_reflog_ent,
 	files_for_each_reflog_ent_reverse,
diff --git a/refs/refs-internal.h b/refs/refs-internal.h
index c92e0c3..5aa3fa0 100644
--- a/refs/refs-internal.h
+++ b/refs/refs-internal.h
@@ -255,6 +255,7 @@ struct ref_storage_be {
 	struct ref_storage_be *next;
 	const char *name;
 	ref_transaction_commit_fn *transaction_commit;
+	ref_transaction_commit_fn *initial_transaction_commit;
 
 	for_each_reflog_ent_fn *for_each_reflog_ent;
 	for_each_reflog_ent_reverse_fn *for_each_reflog_ent_reverse;
-- 
2.4.2.767.g62658d5-twtrsrc
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help