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>
This commit is contained in:

committed by
Jason A. Donenfeld

부모
1e039ada85
커밋
9984e7ab49
@ -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,
|
||||
|
Reference in New Issue
Block a user