Commit ec5b158996e8a4a32e30ea146f62d7b5f5a9260f

Vicent Martí 2011-08-16T10:13:45

Merge pull request #373 from carlosmn/fancy-branchname Fix the reference character check for Unicode

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
diff --git a/src/refs.c b/src/refs.c
index 2e54668..ecd53a6 100644
--- a/src/refs.c
+++ b/src/refs.c
@@ -1647,7 +1647,7 @@ void git_repository__refcache_free(git_refcache *refs)
  *****************************************/
 static int check_valid_ref_char(char ch)
 {
-	if (ch <= ' ')
+	if ((unsigned) ch <= ' ')
 		return GIT_ERROR;
 
 	switch (ch) {
@@ -1752,4 +1752,4 @@ int git_reference__normalize_name(char *buffer_out, size_t out_size, const char 
 int git_reference__normalize_name_oid(char *buffer_out, size_t out_size, const char *name)
 {
 	return normalize_name(buffer_out, out_size, name, 1);
-}
\ No newline at end of file
+}