diff options
Diffstat (limited to 'include/git2/sys/repository.h')
-rw-r--r-- | include/git2/sys/repository.h | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/include/git2/sys/repository.h b/include/git2/sys/repository.h index ba3d65ae5..36f8b5836 100644 --- a/include/git2/sys/repository.h +++ b/include/git2/sys/repository.h @@ -27,7 +27,6 @@ GIT_BEGIN_DECL */ GIT_EXTERN(int) git_repository_new(git_repository **out); - /** * Reset all the internal state in a repository. * @@ -42,6 +41,25 @@ GIT_EXTERN(int) git_repository_new(git_repository **out); GIT_EXTERN(void) git_repository__cleanup(git_repository *repo); /** + * Update the filesystem config settings for an open repository + * + * When a repository is initialized, config values are set based on the + * properties of the filesystem that the repository is on, such as + * "core.ignorecase", "core.filemode", "core.symlinks", etc. If the + * repository is moved to a new filesystem, these properties may no + * longer be correct and API calls may not behave as expected. This + * call reruns the phase of repository initialization that sets those + * properties to compensate for the current filesystem of the repo. + * + * @param repo A repository object + * @param recurse_submodules Should submodules be updated recursively + * @returrn 0 on success, < 0 on error + */ +GIT_EXTERN(int) git_repository_reinit_filesystem( + git_repository *repo, + int recurse_submodules); + +/** * Set the configuration file for this repository * * This configuration file will be used for all configuration |