diff options
Diffstat (limited to 'source/ui-shared.c')
| -rw-r--r-- | source/ui-shared.c | 2 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1 file changed, 1 insertion, 1 deletion
diff --git a/source/ui-shared.c b/source/ui-shared.c index 88e5075..4084748 100644 --- a/source/ui-shared.c +++ b/source/ui-shared.c @@ -1237,7 +1237,7 @@ void cgit_compose_snapshot_prefix(struct strbuf *filename, const char *base, * i.e. each stripped tag can be inverted without ambiguities. */ if (repo_get_oid(the_repository, fmt("refs/tags/%s", ref), &oid) == 0 && - (ref[0] == 'v' || ref[0] == 'V') && isdigit(ref[1]) && + (ref[0] == 'v' || ref[0] == 'V') && isdigit((unsigned char)ref[1]) && ((repo_get_oid(the_repository, fmt("refs/tags/%s", ref + 1), &oid) == 0) + (repo_get_oid(the_repository, fmt("refs/tags/v%s", ref + 1), &oid) == 0) + (repo_get_oid(the_repository, fmt("refs/tags/V%s", ref + 1), &oid) == 0) == 1)) |
