diff options
author | Russell Belfer <rb@github.com> | 2013-10-08 16:35:57 -0700 |
---|---|---|
committer | Russell Belfer <rb@github.com> | 2013-10-08 16:35:57 -0700 |
commit | 92dac975869bf6207eca0754345dc9aa7fec8992 (patch) | |
tree | d210c8864e8cb2fba474b70057ed4655fda5535b /include/git2/sys | |
parent | d5e83627e4ed764115175dc42090afe0df332fe3 (diff) | |
download | libgit2-92dac975869bf6207eca0754345dc9aa7fec8992.tar.gz |
Make reference lookups apply precomposeunicode
Before these changes, looking up a reference would return the
same precomposed or decomposed form of the reference name that
was used to look it up, so on MacOS which ignores the difference
between the two, a single reference could be looked up either way
and git_reference_name would return the form of the name that was
used to look it up! This change makes lookup always return the
precomposed name if core.precomposeunicode is set regardless of
which version was used to look it up. The reference iterator was
already returning the precomposed form from earlier work.
This also updates the CMakeLists.txt rules for enabling iconv
usage because the clar tests for this code were actually not being
activated properly with the old version.
Finally, this moves git_repository_reset_filesystem from include/
git2/repository.h to include/git2/sys/repository.h since it is not
really a function that normal library users should have to think
about very often.
Diffstat (limited to 'include/git2/sys')
-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..e77b1dcba 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 reset recursively + * @returrn 0 on success, < 0 on error + */ +GIT_EXTERN(int) git_repository_reset_filesystem( + git_repository *repo, + int recurse_submodules); + +/** * Set the configuration file for this repository * * This configuration file will be used for all configuration |