Commit 743531372a00e41246026910e2361684e2aad59f

Russell Belfer 2013-10-09T11:57:03

After iconv init reset ref normalize error The iconv init was accidentally clearing the default error state during reference normalization. This resets so that normalization errors will be detected correctly.

1
2
3
4
5
6
7
8
9
10
11
12
diff --git a/src/refs.c b/src/refs.c
index 0da02a6..7530aee 100644
--- a/src/refs.c
+++ b/src/refs.c
@@ -755,6 +755,7 @@ int git_reference__normalize_name(
 		if ((error = git_path_iconv_init_precompose(&ic)) < 0 ||
 			(error = git_path_iconv(&ic, &current, &namelen)) < 0)
 			goto cleanup;
+		error = GIT_EINVALIDSPEC;
 	}
 
 	while (true) {