Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Haggerty <mhagger@alum.mit.edu>2016-09-04 19:08:26 +0300
committerJunio C Hamano <gitster@pobox.com>2016-09-10 01:28:13 +0300
commit62665823d2ddbe69abdac4a9db399769c3e278b4 (patch)
treec1260f3c82d3cab09858512a55020743bbc53e9f /refs/files-backend.c
parente1e33b722c50c26546335fd5a709f89726c2ea2a (diff)
refs: make verify_refname_available() virtual
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'refs/files-backend.c')
-rw-r--r--refs/files-backend.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/refs/files-backend.c b/refs/files-backend.c
index 9cf2f82f74..44eef1cec7 100644
--- a/refs/files-backend.c
+++ b/refs/files-backend.c
@@ -2549,13 +2549,14 @@ out:
return ret;
}
-int verify_refname_available(const char *newname,
- const struct string_list *extras,
- const struct string_list *skip,
- struct strbuf *err)
+static int files_verify_refname_available(struct ref_store *ref_store,
+ const char *newname,
+ const struct string_list *extras,
+ const struct string_list *skip,
+ struct strbuf *err)
{
struct files_ref_store *refs =
- get_files_ref_store(NULL, "verify_refname_available");
+ files_downcast(ref_store, 1, "verify_refname_available");
struct ref_dir *packed_refs = get_packed_refs(refs);
struct ref_dir *loose_refs = get_loose_refs(refs);
@@ -4021,5 +4022,6 @@ struct ref_storage_be refs_be_files = {
files_ref_store_create,
files_transaction_commit,
- files_read_raw_ref
+ files_read_raw_ref,
+ files_verify_refname_available
};