Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
git2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
git2
Commits
5f74c476
Commit
5f74c476
authored
Apr 07, 2014
by
Vicent Marti
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2255 from libgit2/rb/fix-multiple-nfd-iconv-bug
Fix bug with multiple iconv conversions in one dir
parents
6720eef9
7167fd7e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
1 deletions
+13
-1
src/path.c
+2
-0
tests/core/iconv.c
+11
-1
No files found.
src/path.c
View file @
5f74c476
...
...
@@ -782,6 +782,8 @@ int git_path_iconv(git_path_iconv_t *ic, char **in, size_t *inlen)
!
git_path_has_non_ascii
(
*
in
,
*
inlen
))
return
0
;
git_buf_clear
(
&
ic
->
buf
);
while
(
1
)
{
if
(
git_buf_grow
(
&
ic
->
buf
,
wantlen
+
1
)
<
0
)
return
-
1
;
...
...
tests/core/iconv.c
View file @
5f74c476
...
...
@@ -39,8 +39,9 @@ void test_core_iconv__decomposed_to_precomposed(void)
{
#ifdef GIT_USE_ICONV
char
*
data
=
nfd
;
size_t
datalen
=
strlen
(
nfd
);
size_t
datalen
,
nfdlen
=
strlen
(
nfd
);
datalen
=
nfdlen
;
cl_git_pass
(
git_path_iconv
(
&
ic
,
&
data
,
&
datalen
));
GIT_UNUSED
(
datalen
);
...
...
@@ -48,6 +49,15 @@ void test_core_iconv__decomposed_to_precomposed(void)
* (on platforms where iconv is enabled, of course).
*/
cl_assert_equal_s
(
nfc
,
data
);
/* should be able to do it multiple times with the same git_path_iconv_t */
data
=
nfd
;
datalen
=
nfdlen
;
cl_git_pass
(
git_path_iconv
(
&
ic
,
&
data
,
&
datalen
));
cl_assert_equal_s
(
nfc
,
data
);
data
=
nfd
;
datalen
=
nfdlen
;
cl_git_pass
(
git_path_iconv
(
&
ic
,
&
data
,
&
datalen
));
cl_assert_equal_s
(
nfc
,
data
);
#endif
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment