summaryrefslogtreecommitdiff
path: root/include/git2
diff options
context:
space:
mode:
authorVicent Martí <vicent@github.com>2013-05-01 03:03:17 -0700
committerVicent Martí <vicent@github.com>2013-05-01 03:03:17 -0700
commitcfcdbc100a993094ac1f094aa908ed4da472d106 (patch)
tree0f59a950ff797f51cde410ee9e4e348ed832d45c /include/git2
parent5e2261aca86310aa180eab5ccdc345b1539b024d (diff)
parentbade51948c08c36ac0bea63cf62ee1a9dd952501 (diff)
downloadlibgit2-cfcdbc100a993094ac1f094aa908ed4da472d106.tar.gz
Merge pull request #1523 from libgit2/vmg/namespaces
Namespace support
Diffstat (limited to 'include/git2')
-rw-r--r--include/git2/repository.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/include/git2/repository.h b/include/git2/repository.h
index 08024cd89..cd238e17c 100644
--- a/include/git2/repository.h
+++ b/include/git2/repository.h
@@ -626,6 +626,28 @@ typedef enum {
*/
GIT_EXTERN(int) git_repository_state(git_repository *repo);
+/**
+ * Sets the active namespace for this Git Repository
+ *
+ * This namespace affects all reference operations for the repo.
+ * See `man gitnamespaces`
+ *
+ * @param repo The repo
+ * @param nmspace The namespace. This should not include the refs
+ * folder, e.g. to namespace all references under `refs/namespaces/foo/`,
+ * use `foo` as the namespace.
+ * @return 0 on success, -1 on error
+ */
+GIT_EXTERN(int) git_repository_set_namespace(git_repository *repo, const char *nmspace);
+
+/**
+ * Get the currently active namespace for this repository
+ *
+ * @param repo The repo
+ * @return the active namespace, or NULL if there isn't one
+ */
+GIT_EXTERN(const char *) git_repository_get_namespace(git_repository *repo);
+
/** @} */
GIT_END_DECL
#endif