From c1572bb5ec4540b5008490cf471cc4a5e65ef728 Mon Sep 17 00:00:00 2001 From: John Keeping Date: Sat, 31 Mar 2018 14:20:01 +0100 Subject: Add "snapshot-prefix" repo configuration Allow using a user-specified value for the prefix in snapshot files instead of the repository basename. For example, files downloaded from the linux-stable.git repository should be named linux-$VERSION and not linux-stable-$VERSION, which can be achieved by setting: repo.snapshot-prefix=linux Signed-off-by: John Keeping Reviewed-by: Christian Hesse --- cgit.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'cgit.c') diff --git a/cgit.c b/cgit.c index bd9cb3f..d2f7b9c 100644 --- a/cgit.c +++ b/cgit.c @@ -79,6 +79,8 @@ static void repo_config(struct cgit_repo *repo, const char *name, const char *va item->util = xstrdup(value); } else if (!strcmp(name, "section")) repo->section = xstrdup(value); + else if (!strcmp(name, "snapshot-prefix")) + repo->snapshot_prefix = xstrdup(value); else if (!strcmp(name, "readme") && value != NULL) { if (repo->readme.items == ctx.cfg.readme.items) memset(&repo->readme, 0, sizeof(repo->readme)); -- cgit 1.4.1 78'>refs log tree commit diff
Commit message (Expand)Author
2015-08-13configfile.c: don't include system headers directlyJohn Keeping
2015-08-13Remove redundant includesJohn Keeping
2015-08-13Makefile: include Git's config.mak.unameJohn Keeping
2015-08-13tests: allow shell to be overriddenJohn Keeping
2015-08-13redirect: cleanlinessJason A. Donenfeld
2015-08-13redirect: be more careful for different cgi setupsJason A. Donenfeld
2015-08-12ui-log: fix double countingJohn Keeping
2015-08-12log: allow users to follow a fileJohn Keeping
2015-08-12shared: make cgit_diff_tree_cb publicJohn Keeping
2015-08-12t0110: Chain together using &&Jason A. Donenfeld
2015-08-12about: always ensure page has a trailing slashJason A. Donenfeld
2015-08-12filters: apply HTML escapingLazaros Koromilas
2015-08-12git: update to v2.5.0Christian Hesse
2015-08-12Fix processing of repo.hide and repo.ignoreDaniel Reichelt