From 9984e7ab49c59e49a0d7e62c3435e7133f7a53ec Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Tue, 24 May 2016 18:15:18 +0200 Subject: Avoid ambiguities when prettifying snapshot names When composing snapshot file names for a tag with a prefix of the form v[0-9] (resp. V[0-9]), the leading "v" (resp. "V") is stripped. This leads to conflicts if a tag with the stripped name already exists or if there are tags only differing in the capitalization of the leading "v". Make sure we do not strip the "v" in these cases. Reported-by: Juuso Lapinlampi Signed-off-by: Lukas Fleischer --- ui-shared.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'ui-shared.h') diff --git a/ui-shared.h b/ui-shared.h index b457c97..87799f1 100644 --- a/ui-shared.h +++ b/ui-shared.h @@ -71,6 +71,8 @@ __attribute__((format (printf,3,4))) extern void cgit_print_error_page(int code, const char *msg, const char *fmt, ...); extern void cgit_print_pageheader(void); extern void cgit_print_filemode(unsigned short mode); +extern void cgit_compose_snapshot_prefix(struct strbuf *filename, + const char *base, const char *ref); extern void cgit_print_snapshot_links(const char *repo, const char *head, const char *hex, int snapshots); extern void cgit_add_hidden_formfields(int incl_head, int incl_search, -- cgit v1.2.3-70-g09d2