snapshot: support special value 'all' to enable all formats

Signed-off-by: Christian Hesse <mail@eworm.de>
Reviewed-by: John Keeping <john@keeping.me.uk>
This commit is contained in:
Christian Hesse 2018-06-07 22:01:50 +02:00 committed by Jason A. Donenfeld
parent c712d5ac43
commit 30a378b571
2 changed files with 4 additions and 0 deletions

View file

@ -390,6 +390,9 @@ int cgit_parse_snapshots_mask(const char *str)
if (atoi(str))
return 1;
if (strcmp(str, "all") == 0)
return INT_MAX;
string_list_split(&tokens, str, ' ', -1);
string_list_remove_empty_items(&tokens, 0);