From d746827ec43a6dd53bce56ee8d8100a03383329e Mon Sep 17 00:00:00 2001
From: Lars Hjemli <hjemli@gmail.com>
Date: Thu, 20 Aug 2009 17:41:54 +0200
Subject: cgit.c: add support for caching autodetected repositories

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
---
 cgit.h | 1 +
 1 file changed, 1 insertion(+)

(limited to 'cgit.h')

diff --git a/cgit.h b/cgit.h
index adb8da4..5659580 100644
--- a/cgit.h
+++ b/cgit.h
@@ -168,6 +168,7 @@ struct cgit_config {
 	int cache_max_create_time;
 	int cache_repo_ttl;
 	int cache_root_ttl;
+	int cache_scanrc_ttl;
 	int cache_static_ttl;
 	int embedded;
 	int enable_index_links;
-- 
cgit v1.2.3


From e7af002d5c405c82652f739d08ced3908d1f57e7 Mon Sep 17 00:00:00 2001
From: Lars Hjemli <hjemli@gmail.com>
Date: Sun, 23 Aug 2009 22:58:39 +0200
Subject: Introduce 'section' as canonical spelling for 'repo.group'

The 'repo.' prefix should be reserved for repo-specific options, but
the option 'repo.group' must still be honored to stay backwards
compatible.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
---
 cgit.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'cgit.h')

diff --git a/cgit.h b/cgit.h
index 5659580..fc7c7d5 100644
--- a/cgit.h
+++ b/cgit.h
@@ -65,9 +65,9 @@ struct cgit_repo {
 	char *desc;
 	char *owner;
 	char *defbranch;
-	char *group;
 	char *module_link;
 	char *readme;
+	char *section;
 	char *clone_url;
 	int snapshots;
 	int enable_log_filecount;
@@ -156,12 +156,12 @@ struct cgit_config {
 	char *logo;
 	char *logo_link;
 	char *module_link;
-	char *repo_group;
 	char *robots;
 	char *root_title;
 	char *root_desc;
 	char *root_readme;
 	char *script_name;
+	char *section;
 	char *virtual_root;
 	int cache_size;
 	int cache_dynamic_ttl;
-- 
cgit v1.2.3


From 74061ed5f03e72796450aa3b8ca1cf6ced5d59e2 Mon Sep 17 00:00:00 2001
From: Lars Hjemli <hjemli@gmail.com>
Date: Mon, 24 Aug 2009 00:04:58 +0200
Subject: Add support for repo-local cgitrc file

When recursively scanning a directory tree looking for git repositories,
cgit will now parse cgitrc files found within such repositories.

The repo-specific config files can include any repo-specific options
except 'repo.url' and 'repo.path'. Also, in such config files the 'repo.'
prefix can not be used, i.e. the valid options then becomes:
* name
* clone-url
* desc
* ower
* defbranch
* snapshots
* enable-log-filecount
* enable-log-linecount
* max-stats
* module-link
* section
* about-filter
* commit-filter
* source-filter
* readme

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
---
 cgit.h | 3 +++
 1 file changed, 3 insertions(+)

(limited to 'cgit.h')

diff --git a/cgit.h b/cgit.h
index fc7c7d5..3359be9 100644
--- a/cgit.h
+++ b/cgit.h
@@ -79,6 +79,9 @@ struct cgit_repo {
 	struct cgit_filter *source_filter;
 };
 
+typedef void (*repo_config_fn)(struct cgit_repo *repo, const char *name,
+	      const char *value);
+
 struct cgit_repolist {
 	int length;
 	int count;
-- 
cgit v1.2.3


From 2273c2c821bfc77d492d7e97ae38f162d7fc91aa Mon Sep 17 00:00:00 2001
From: Lars Hjemli <hjemli@gmail.com>
Date: Mon, 24 Aug 2009 08:53:21 +0200
Subject: Add config option 'enable-filter-overrides'

This option must be enabled if repo-specific cgitrc files should be
allowed to override any of the 'filter' options.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
---
 cgit.h | 1 +
 1 file changed, 1 insertion(+)

(limited to 'cgit.h')

diff --git a/cgit.h b/cgit.h
index 3359be9..ef109aa 100644
--- a/cgit.h
+++ b/cgit.h
@@ -174,6 +174,7 @@ struct cgit_config {
 	int cache_scanrc_ttl;
 	int cache_static_ttl;
 	int embedded;
+	int enable_filter_overrides;
 	int enable_index_links;
 	int enable_log_filecount;
 	int enable_log_linecount;
-- 
cgit v1.2.3