diff options
author | Russell Belfer <rb@github.com> | 2014-05-08 13:52:46 -0700 |
---|---|---|
committer | Russell Belfer <rb@github.com> | 2014-05-08 13:52:46 -0700 |
commit | 43a0413524fcb3b7e3405382c050a0b3c45cf257 (patch) | |
tree | 1ab8b8c063697da1f0e0973061fa600ad4599a06 /src/path.h | |
parent | ed476c236b8328c31acb150ee69eaf00c821b9e3 (diff) | |
download | libgit2-43a0413524fcb3b7e3405382c050a0b3c45cf257.tar.gz |
Pass unconverted data when iconv doesn't like it
When using Iconv to convert unicode data and iconv doesn't like
the source data (because it thinks that it's not actual UTF-8),
instead of stopping the operation, just use the unconverted data.
This will generally do the right thing on the filesystem, since
that is the source of the non-UTF-8 path data anyhow.
This adds some tests for creating and looking up branches with
messy Unicode names. Also, this takes the helper function that
was previously internal to `git_repository_init` and makes it
into `git_path_does_fs_decompose_unicode` which is a useful in
tests to understand what the expected results should be.
Diffstat (limited to 'src/path.h')
-rw-r--r-- | src/path.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/path.h b/src/path.h index 2367d707b..3213c5104 100644 --- a/src/path.h +++ b/src/path.h @@ -436,4 +436,6 @@ extern int git_path_iconv(git_path_iconv_t *ic, char **in, size_t *inlen); #endif /* GIT_USE_ICONV */ +extern bool git_path_does_fs_decompose_unicode(const char *root); + #endif |