diff options
author | Vicent Marti <tanoku@gmail.com> | 2013-04-30 23:02:13 +0400 |
---|---|---|
committer | Vicent Marti <tanoku@gmail.com> | 2013-04-30 23:02:13 +0400 |
commit | bade51948c08c36ac0bea63cf62ee1a9dd952501 (patch) | |
tree | bb812a2147b3ffd7292b848f4e5f459b62614614 /include/git2/repository.h | |
parent | 7dcda3aa3780292e33bb9229ff998ffe4edc07bf (diff) |
lol namespacesvmg/namespaces
Diffstat (limited to 'include/git2/repository.h')
-rw-r--r-- | include/git2/repository.h | 22 |
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 |