summaryrefslogtreecommitdiff
path: root/include/git2/sys/refs.h
diff options
context:
space:
mode:
authorVicent Marti <tanoku@gmail.com>2013-04-22 16:41:56 +0200
committerVicent Marti <tanoku@gmail.com>2013-04-22 16:41:56 +0200
commit0edad3cc0451a42b566d70f64611acc214a03022 (patch)
tree9a7c4c7e7ab0be366df168b7f1750f58b8bd86ae /include/git2/sys/refs.h
parent4ef2c79cb6dc81e17b68ccf7c270bcc7e4f85bfb (diff)
parentf063a75882769cb6fc652de425ac16ba4b88b616 (diff)
downloadlibgit2-vmg/dupe-odb-backends.tar.gz
Merge branch 'development' into vmg/dupe-odb-backendsvmg/dupe-odb-backends
Conflicts: src/odb.c
Diffstat (limited to 'include/git2/sys/refs.h')
-rw-r--r--include/git2/sys/refs.h38
1 files changed, 38 insertions, 0 deletions
diff --git a/include/git2/sys/refs.h b/include/git2/sys/refs.h
new file mode 100644
index 000000000..85963258c
--- /dev/null
+++ b/include/git2/sys/refs.h
@@ -0,0 +1,38 @@
+/*
+ * 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_sys_git_refdb_h__
+#define INCLUDE_sys_git_refdb_h__
+
+#include "git2/common.h"
+#include "git2/types.h"
+#include "git2/oid.h"
+
+/**
+ * Create a new direct reference from an OID.
+ *
+ * @param name the reference name
+ * @param oid the object id for a direct reference
+ * @param symbolic the target for a symbolic reference
+ * @return the created git_reference or NULL on error
+ */
+GIT_EXTERN(git_reference *) git_reference__alloc(
+ const char *name,
+ const git_oid *oid,
+ const git_oid *peel);
+
+/**
+ * Create a new symbolic reference.
+ *
+ * @param name the reference name
+ * @param symbolic the target for a symbolic reference
+ * @return the created git_reference or NULL on error
+ */
+GIT_EXTERN(git_reference *) git_reference__alloc_symbolic(
+ const char *name,
+ const char *target);
+
+#endif