]> git.proxmox.com Git - libgit2.git/commit - tests/refs/branches/create.c
Pass unconverted data when iconv doesn't like it
authorRussell Belfer <rb@github.com>
Thu, 8 May 2014 20:52:46 +0000 (13:52 -0700)
committerRussell Belfer <rb@github.com>
Thu, 8 May 2014 20:52:46 +0000 (13:52 -0700)
commit43a0413524fcb3b7e3405382c050a0b3c45cf257
tree1ab8b8c063697da1f0e0973061fa600ad4599a06
parented476c236b8328c31acb150ee69eaf00c821b9e3
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.
src/path.c
src/path.h
src/repository.c
tests/refs/branches/create.c