diff options
Diffstat (limited to 'include/git2/repository.h')
-rw-r--r-- | include/git2/repository.h | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/include/git2/repository.h b/include/git2/repository.h index 258b9ac00..0de4d7557 100644 --- a/include/git2/repository.h +++ b/include/git2/repository.h @@ -352,6 +352,15 @@ typedef struct { * pointing to this URL. */ const char *origin_url; + +#ifdef GIT_EXPERIMENTAL_SHA256 + /** + * + * Type of object IDs to use for this repository, or 0 for + * default (currently SHA1). + */ + git_oid_t oid_type; +#endif } git_repository_init_options; #define GIT_REPOSITORY_INIT_OPTIONS_VERSION 1 @@ -457,7 +466,9 @@ GIT_EXTERN(int) git_repository_head_unborn(git_repository *repo); * Check if a repository is empty * * An empty repository has just been initialized and contains no references - * apart from HEAD, which must be pointing to the unborn master branch. + * apart from HEAD, which must be pointing to the unborn master branch, + * or the branch specified for the repository in the `init.defaultBranch` + * configuration variable. * * @param repo Repo to test * @return 1 if the repository is empty, 0 if it isn't, error code @@ -950,6 +961,14 @@ GIT_EXTERN(int) git_repository_ident(const char **name, const char **email, cons */ GIT_EXTERN(int) git_repository_set_ident(git_repository *repo, const char *name, const char *email); +/** + * Gets the object type used by this repository. + * + * @param repo the repository + * @return the object id type + */ +GIT_EXTERN(git_oid_t) git_repository_oid_type(git_repository *repo); + /** @} */ GIT_END_DECL #endif |