diff options
author | Lukas Fleischer | 2016-05-24 18:15:18 +0200 |
---|---|---|
committer | Jason A. Donenfeld | 2016-07-05 16:14:40 +0200 |
commit | 9984e7ab49c59e49a0d7e62c3435e7133f7a53ec (patch) | |
tree | 1f3a53622746e5fe43e9d5c7c9bc27ab2da22761 /ui-shared.h | |
parent | 1e039ada8554c7e2fc65524827c61613a24256fb (diff) | |
download | cgit-9984e7ab49c59e49a0d7e62c3435e7133f7a53ec.tar.gz cgit-9984e7ab49c59e49a0d7e62c3435e7133f7a53ec.tar.bz2 cgit-9984e7ab49c59e49a0d7e62c3435e7133f7a53ec.zip |
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 <wub@partyvan.eu>
Signed-off-by: Lukas Fleischer <lfleischer@lfos.de>
Diffstat (limited to 'ui-shared.h')
-rw-r--r-- | ui-shared.h | 2 |
1 files changed, 2 insertions, 0 deletions
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))) | |||
71 | extern void cgit_print_error_page(int code, const char *msg, const char *fmt, ...); | 71 | extern void cgit_print_error_page(int code, const char *msg, const char *fmt, ...); |
72 | extern void cgit_print_pageheader(void); | 72 | extern void cgit_print_pageheader(void); |
73 | extern void cgit_print_filemode(unsigned short mode); | 73 | extern void cgit_print_filemode(unsigned short mode); |
74 | extern void cgit_compose_snapshot_prefix(struct strbuf *filename, | ||
75 | const char *base, const char *ref); | ||
74 | extern void cgit_print_snapshot_links(const char *repo, const char *head, | 76 | extern void cgit_print_snapshot_links(const char *repo, const char *head, |
75 | const char *hex, int snapshots); | 77 | const char *hex, int snapshots); |
76 | extern void cgit_add_hidden_formfields(int incl_head, int incl_search, | 78 | extern void cgit_add_hidden_formfields(int incl_head, int incl_search, |