summaryrefslogtreecommitdiff
path: root/src/refs.h
diff options
context:
space:
mode:
authorRussell Belfer <rb@github.com>2013-10-08 16:35:57 -0700
committerRussell Belfer <rb@github.com>2013-10-08 16:35:57 -0700
commit92dac975869bf6207eca0754345dc9aa7fec8992 (patch)
treed210c8864e8cb2fba474b70057ed4655fda5535b /src/refs.h
parentd5e83627e4ed764115175dc42090afe0df332fe3 (diff)
downloadlibgit2-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 'src/refs.h')
-rw-r--r--src/refs.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/refs.h b/src/refs.h
index 4b91c25e8..80c7703fc 100644
--- a/src/refs.h
+++ b/src/refs.h
@@ -46,6 +46,8 @@
#define GIT_STASH_FILE "stash"
#define GIT_REFS_STASH_FILE GIT_REFS_DIR GIT_STASH_FILE
+#define GIT_REF_FORMAT__PRECOMPOSE_UNICODE (1u << 16)
+
#define GIT_REFNAME_MAX 1024
struct git_reference {