diff options
author | Edward Thomson <ethomson@edwardthomson.com> | 2013-03-01 15:37:33 -0600 |
---|---|---|
committer | Edward Thomson <ethomson@edwardthomson.com> | 2013-03-07 11:01:52 -0600 |
commit | d00d54645d931c77a9b401518c0d73e3f640454b (patch) | |
tree | e1932dcc97172a53524e9db1ba4923cf137a4f9c /src/refdb.h | |
parent | 6a9ef012376e8a21dcfd0499ab16048eb6e954c3 (diff) | |
download | libgit2-d00d54645d931c77a9b401518c0d73e3f640454b.tar.gz |
immutable references and a pluggable ref database
Diffstat (limited to 'src/refdb.h')
-rw-r--r-- | src/refdb.h | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/src/refdb.h b/src/refdb.h new file mode 100644 index 000000000..0969711b9 --- /dev/null +++ b/src/refdb.h @@ -0,0 +1,46 @@ +/* + * Copyright (C) the libgit2 contributors. All rights reserved. + * + * This file is part of libgit2, distributed under the GNU GPL v2 with + * a Linking Exception. For full terms see the included COPYING file. + */ +#ifndef INCLUDE_refdb_h__ +#define INCLUDE_refdb_h__ + +#include "git2/refdb.h" +#include "repository.h" + +struct git_refdb { + git_refcount rc; + git_repository *repo; + git_refdb_backend *backend; +}; + +int git_refdb_exists( + int *exists, + git_refdb *refdb, + const char *ref_name); + +int git_refdb_lookup( + git_reference **out, + git_refdb *refdb, + const char *ref_name); + +int git_refdb_foreach( + git_refdb *refdb, + unsigned int list_flags, + git_reference_foreach_cb callback, + void *payload); + +int git_refdb_foreach_glob( + git_refdb *refdb, + const char *glob, + unsigned int list_flags, + git_reference_foreach_cb callback, + void *payload); + +int git_refdb_write(git_refdb *refdb, const git_reference *ref); + +int git_refdb_delete(struct git_refdb *refdb, const git_reference *ref); + +#endif |