]> git.proxmox.com Git - libgit2.git/blob - src/refdb.h
Add range checking around cache opts
[libgit2.git] / src / refdb.h
1 /*
2 * Copyright (C) the libgit2 contributors. All rights reserved.
3 *
4 * This file is part of libgit2, distributed under the GNU GPL v2 with
5 * a Linking Exception. For full terms see the included COPYING file.
6 */
7 #ifndef INCLUDE_refdb_h__
8 #define INCLUDE_refdb_h__
9
10 #include "git2/refdb.h"
11 #include "repository.h"
12
13 struct git_refdb {
14 git_refcount rc;
15 git_repository *repo;
16 git_refdb_backend *backend;
17 };
18
19 int git_refdb_exists(
20 int *exists,
21 git_refdb *refdb,
22 const char *ref_name);
23
24 int git_refdb_lookup(
25 git_reference **out,
26 git_refdb *refdb,
27 const char *ref_name);
28
29 int git_refdb_foreach(
30 git_refdb *refdb,
31 unsigned int list_flags,
32 git_reference_foreach_cb callback,
33 void *payload);
34
35 int git_refdb_foreach_glob(
36 git_refdb *refdb,
37 const char *glob,
38 unsigned int list_flags,
39 git_reference_foreach_cb callback,
40 void *payload);
41
42 int git_refdb_write(git_refdb *refdb, const git_reference *ref);
43
44 int git_refdb_delete(git_refdb *refdb, const git_reference *ref);
45
46 #endif