summaryrefslogtreecommitdiff
path: root/tests-clar/refs/unicode.c
Commit message (Collapse)AuthorAgeFilesLines
* Make reference lookups apply precomposeunicodeRussell Belfer2013-10-081-9/+6
| | | | | | | | | | | | | | | | | | | | | 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.
* More filemode cleanups for FAT on MacOSRussell Belfer2013-10-081-4/+19
| | | | | | | | | | | | | | | | | | | | | | This cleans up some additional issues. The main change is that on a filesystem that doesn't support mode bits, libgit2 will now create new blobs with GIT_FILEMODE_BLOB always instead of being at the mercy to the filesystem driver to report executable or not. This means that if "core.filemode" lies and claims that filemode is not supported, then we will ignore the executable bit from the filesystem. Previously we would have allowed it. This adds an option to the new git_repository_reset_filesystem to recurse through submodules if desired. There may be other types of APIs that would like a "recurse submodules" option, but this one is particularly useful. This also has a number of cleanups, etc., for related things including trying to give better error messages when problems come up from the filesystem. For example, the FAT filesystem driver on MacOS appears to return errno EINVAL if you attempt to write a filename with invalid UTF-8 in it. We try to capture that with a better error message now.
* Use cl_assert_equal_s() instead of strcmp().Sebastian Bauer2013-01-251-2/+2
| | | | | Replaced all cl_assert(!strcmp()) or semantically equivalent forms by cl_assert_equal_s().
* Rename ref and reflog apis for consistencyBen Straub2012-11-271-2/+2
|
* Reset all static variables to NULL in clar's __cleanupSascha Cunz2012-11-231-0/+2
| | | | | | | | | | | | Without this change, any failed assertion in the second (or a later) test inside a test suite has a chance of double deleting memory, resulting in a heap corruption. See #1096 for details. This leaves alone the test cases where we "just" use cl_git_sandbox_init() and cl_git_sandbox_cleanup(). These methods already take good care to not double delete a repository. Fixes #1096
* Clean up valgrind warningsCarlos Martín Nieto2012-04-041-6/+7
|
* reference: Fix creation of references with extended ASCII characters in ↵nulltoken2012-04-011-0/+41
their name