Signed-off-by: Ronnie Sahlberg <rsahlb...@google.com>
Signed-off-by: David Turner <dtur...@twopensource.com>
---
 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 3254378..d481a94 100644
--- a/refs.c
+++ b/refs.c
@@ -1258,3 +1258,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 b3372e6..723127e 100644
--- a/refs/files-backend.c
+++ b/refs/files-backend.c
@@ -3337,8 +3337,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;
@@ -3562,6 +3562,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 ee2bea6..142c663 100644
--- a/refs/refs-internal.h
+++ b/refs/refs-internal.h
@@ -267,6 +267,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.749.g730654d-twtrsrc

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

Reply via email to