diff options
| author | nulltoken <emeric.fermas@gmail.com> | 2011-02-13 20:18:35 +0100 |
|---|---|---|
| committer | Vicent Marti <tanoku@gmail.com> | 2011-03-03 20:23:48 +0200 |
| commit | e1be10281647e9db93cc88c435c56abacdeb0af0 (patch) | |
| tree | 54b7f4ca0d856a34e65c18525cfd2ebfb86c3180 /src/refs.c | |
| parent | 77600378db1e7b7acf423286f8a784d676edc6f2 (diff) | |
| download | libgit2-e1be10281647e9db93cc88c435c56abacdeb0af0.tar.gz | |
Added some more tests to ensure the correct behavior of git_reference__normalize_name().
Diffstat (limited to 'src/refs.c')
| -rw-r--r-- | src/refs.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/refs.c b/src/refs.c index 46589e04d..05c4e10ae 100644 --- a/src/refs.c +++ b/src/refs.c @@ -666,6 +666,7 @@ static int check_valid_ref_char(char ch) case '\\': case '?': case '[': + case '*': return GIT_ERROR; break; @@ -720,14 +721,8 @@ int git_reference__normalize_name(char *buffer_out, const char *name, git_rtype } } - if (*current == '/') { - /* Slashes are not authorized in symbolic reference name */ - if (type == GIT_REF_SYMBOLIC) { - return GIT_EINVALIDREFNAME; - } - + if (*current == '/') contains_a_slash = 1; - } *buffer_out++ = *current++; } |
