List for cgit developers and users
 help / color / mirror / Atom feed
* [PATCH] Make default pages configurable
@ 2019-08-13 17:22 
  2019-08-15 10:26 ` john
  0 siblings, 1 reply; 9+ messages in thread
From:  @ 2019-08-13 17:22 UTC (permalink / raw)


This adds two configuration options, "default-page" and
"default-page-repo", allowing to change the default page for
the whole site and repositories, respectively.
A few changes were required to make this work, namely:
- the "index" tab on the home page and the "summary" tab on repo pages
  now explicitly point to their respective targets instead of pointing
  to the site/repo root;
- trying to access the "about" page on a repository without one results
  in being redirected to the "summary" page explicitly.

---
This patch was tested and seems to work well for all use cases i could think
of. Let me know if i missed anything.

 cgit.c        |  6 ++++++
 cgit.h        |  2 ++
 cgitrc.5.txt  |  9 +++++++++
 cmd.c         | 11 ++++-------
 ui-repolist.c |  2 +-
 ui-shared.c   | 12 +++++++++---
 ui-shared.h   |  2 ++
 7 files changed, 33 insertions(+), 11 deletions(-)

diff --git a/cgit.c b/cgit.c
index 2910d4b..0967354 100644
--- a/cgit.c
+++ b/cgit.c
@@ -145,6 +145,10 @@ static void config_cb(const char *name, const char *value)
 		ctx.cfg.logo = xstrdup(value);
 	else if (!strcmp(name, "logo-link"))
 		ctx.cfg.logo_link = xstrdup(value);
+	else if (!strcmp(name, "default-page"))
+		ctx.cfg.default_page = xstrdup(value);
+	else if (!strcmp(name, "default-page-repo"))
+		ctx.cfg.default_page_repo = xstrdup(value);
 	else if (!strcmp(name, "module-link"))
 		ctx.cfg.module_link = xstrdup(value);
 	else if (!strcmp(name, "strict-export"))
@@ -367,6 +371,8 @@ static void prepare_context(void)
 	ctx.cfg.branch_sort = 0;
 	ctx.cfg.commit_sort = 0;
 	ctx.cfg.css = "/cgit.css";
+	ctx.cfg.default_page = "repolist";
+	ctx.cfg.default_page_repo = "summary";
 	ctx.cfg.logo = "/cgit.png";
 	ctx.cfg.favicon = "/favicon.ico";
 	ctx.cfg.local_time = 0;
diff --git a/cgit.h b/cgit.h
index 7ec46b4..b313814 100644
--- a/cgit.h
+++ b/cgit.h
@@ -196,6 +196,8 @@ struct cgit_config {
 	char *clone_prefix;
 	char *clone_url;
 	char *css;
+	char *default_page;
+	char *default_page_repo;
 	char *favicon;
 	char *footer;
 	char *head_include;
diff --git a/cgitrc.5.txt b/cgitrc.5.txt
index ba77826..77535eb 100644
--- a/cgitrc.5.txt
+++ b/cgitrc.5.txt
@@ -128,6 +128,15 @@ css::
 	Url which specifies the css document to include in all cgit pages.
 	Default value: "/cgit.css".

+default-page::
+	Specifies the default home page. Possible values are "repolist" and
+	"about". Default value: "repolist".
+
+default-page-repo::
+	Specifies the default page for repositories. Possible values are
+	"about", "summary", "refs", "log", "tree", "commit", "diff" and
+	"stats". Default value: "summary".
+
 email-filter::
 	Specifies a command which will be invoked to format names and email
 	address of committers, authors, and taggers, as represented in various
diff --git a/cmd.c b/cmd.c
index bf6d8f5..6a2a377 100644
--- a/cmd.c
+++ b/cmd.c
@@ -51,13 +51,10 @@ static void about_fn(void)
 			free(redirect);
 		} else if (ctx.repo->readme.nr)
 			cgit_print_repo_readme(ctx.qry.path);
-		else if (ctx.repo->homepage)
-			cgit_redirect(ctx.repo->homepage, false);
 		else {
-			char *currenturl = cgit_currenturl();
-			char *redirect = fmtalloc("%s../", currenturl);
+			char *redirect = fmtalloc("%s%s/summary/",
+				ctx.cfg.virtual_root, ctx.repo->url);
 			cgit_redirect(redirect, false);
-			free(currenturl);
 			free(redirect);
 		}
 	} else
@@ -196,9 +193,9 @@ struct cgit_cmd *cgit_get_cmd(void)

 	if (ctx.qry.page == NULL) {
 		if (ctx.repo)
-			ctx.qry.page = "summary";
+			ctx.qry.page = ctx.cfg.default_page_repo;
 		else
-			ctx.qry.page = "repolist";
+			ctx.qry.page = ctx.cfg.default_page;
 	}

 	for (i = 0; i < sizeof(cmds)/sizeof(*cmds); i++)
diff --git a/ui-repolist.c b/ui-repolist.c
index 7cf7638..a49f457 100644
--- a/ui-repolist.c
+++ b/ui-repolist.c
@@ -321,7 +321,7 @@ void cgit_print_repolist(void)
 		}
 		htmlf("<tr><td class='%s'>",
 		      !sorted && section ? "sublevel-repo" : "toplevel-repo");
-		cgit_summary_link(ctx.repo->name, ctx.repo->name, NULL, NULL);
+		cgit_repo_link(ctx.repo->name, ctx.repo->name, NULL, NULL);
 		html("</td><td>");
 		repourl = cgit_repourl(ctx.repo->url);
 		html_link_open(repourl, NULL, NULL);
diff --git a/ui-shared.c b/ui-shared.c
index d2358f2..bb3050e 100644
--- a/ui-shared.c
+++ b/ui-shared.c
@@ -327,10 +327,16 @@ static void reporevlink(const char *page, const char *name, const char *title,
 	html("</a>");
 }

+void cgit_repo_link(const char *name, const char *title, const char *class,
+			const char *head)
+{
+	reporevlink(NULL, name, title, class, head, NULL, NULL);
+}
+
 void cgit_summary_link(const char *name, const char *title, const char *class,
 		       const char *head)
 {
-	reporevlink(NULL, name, title, class, head, NULL, NULL);
+	reporevlink("summary", name, title, class, head, NULL, NULL);
 }

 void cgit_tag_link(const char *name, const char *title, const char *class,
@@ -994,7 +1000,7 @@ static void print_header(void)
 	if (ctx.repo) {
 		cgit_index_link("index", NULL, NULL, NULL, NULL, 0, 1);
 		html(" : ");
-		cgit_summary_link(ctx.repo->name, ctx.repo->name, NULL, NULL);
+		cgit_repo_link(ctx.repo->name, ctx.repo->name, NULL, NULL);
 		if (ctx.env.authenticated) {
 			html("</td><td class='form'>");
 			html("<form method='get'>\n");
@@ -1083,7 +1089,7 @@ void cgit_print_pageheader(void)
 		html("</form>\n");
 	} else if (ctx.env.authenticated) {
 		char *currenturl = cgit_currenturl();
-		site_link(NULL, "index", NULL, hc("repolist"), NULL, NULL, 0, 1);
+		site_link("repolist", "index", NULL, hc("repolist"), NULL, NULL, 0, 1);
 		if (ctx.cfg.root_readme)
 			site_link("about", "about", NULL, hc("about"),
 				  NULL, NULL, 0, 1);
diff --git a/ui-shared.h b/ui-shared.h
index 6964873..4d14858 100644
--- a/ui-shared.h
+++ b/ui-shared.h
@@ -17,6 +17,8 @@ extern void cgit_add_clone_urls(void (*fn)(const char *));

 extern void cgit_index_link(const char *name, const char *title,
 			    const char *class, const char *pattern, const char *sort, int ofs, int always_root);
+extern void cgit_repo_link(const char *name, const char *title,
+				  const char *class, const char *head);
 extern void cgit_summary_link(const char *name, const char *title,
 			      const char *class, const char *head);
 extern void cgit_tag_link(const char *name, const char *title,
--
2.22.0



^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH] Make default pages configurable
  2019-08-13 17:22 [PATCH] Make default pages configurable 
@ 2019-08-15 10:26 ` john
  2019-08-15 10:56   ` 
  2019-08-15 12:50   ` [PATCH v2] " 
  0 siblings, 2 replies; 9+ messages in thread
From: john @ 2019-08-15 10:26 UTC (permalink / raw)


On Tue, Aug 13, 2019 at 07:22:21PM +0200, Naaam Favier wrote:
> This adds two configuration options, "default-page" and
> "default-page-repo", allowing to change the default page for
> the whole site and repositories, respectively.
> A few changes were required to make this work, namely:
> - the "index" tab on the home page and the "summary" tab on repo pages
>   now explicitly point to their respective targets instead of pointing
>   to the site/repo root;
> - trying to access the "about" page on a repository without one results
>   in being redirected to the "summary" page explicitly.

Missing sign-off.  See https://developercertificate.org/ for what this
means.

The commit message also needs to explain *why* we want this change in
addition to how the change is implemented.

> ---
> This patch was tested and seems to work well for all use cases i could think
> of. Let me know if i missed anything.
> 
>  cgit.c        |  6 ++++++
>  cgit.h        |  2 ++
>  cgitrc.5.txt  |  9 +++++++++
>  cmd.c         | 11 ++++-------
>  ui-repolist.c |  2 +-
>  ui-shared.c   | 12 +++++++++---
>  ui-shared.h   |  2 ++
>  7 files changed, 33 insertions(+), 11 deletions(-)
> 
> diff --git a/cgit.c b/cgit.c
> index 2910d4b..0967354 100644
> --- a/cgit.c
> +++ b/cgit.c
> @@ -145,6 +145,10 @@ static void config_cb(const char *name, const char *value)
>  		ctx.cfg.logo = xstrdup(value);
>  	else if (!strcmp(name, "logo-link"))
>  		ctx.cfg.logo_link = xstrdup(value);
> +	else if (!strcmp(name, "default-page"))
> +		ctx.cfg.default_page = xstrdup(value);
> +	else if (!strcmp(name, "default-page-repo"))
> +		ctx.cfg.default_page_repo = xstrdup(value);
>  	else if (!strcmp(name, "module-link"))
>  		ctx.cfg.module_link = xstrdup(value);
>  	else if (!strcmp(name, "strict-export"))
> @@ -367,6 +371,8 @@ static void prepare_context(void)
>  	ctx.cfg.branch_sort = 0;
>  	ctx.cfg.commit_sort = 0;
>  	ctx.cfg.css = "/cgit.css";
> +	ctx.cfg.default_page = "repolist";
> +	ctx.cfg.default_page_repo = "summary";
>  	ctx.cfg.logo = "/cgit.png";
>  	ctx.cfg.favicon = "/favicon.ico";
>  	ctx.cfg.local_time = 0;
> diff --git a/cgit.h b/cgit.h
> index 7ec46b4..b313814 100644
> --- a/cgit.h
> +++ b/cgit.h
> @@ -196,6 +196,8 @@ struct cgit_config {
>  	char *clone_prefix;
>  	char *clone_url;
>  	char *css;
> +	char *default_page;
> +	char *default_page_repo;
>  	char *favicon;
>  	char *footer;
>  	char *head_include;
> diff --git a/cgitrc.5.txt b/cgitrc.5.txt
> index ba77826..77535eb 100644
> --- a/cgitrc.5.txt
> +++ b/cgitrc.5.txt
> @@ -128,6 +128,15 @@ css::
>  	Url which specifies the css document to include in all cgit pages.
>  	Default value: "/cgit.css".
> 
> +default-page::
> +	Specifies the default home page. Possible values are "repolist" and
> +	"about". Default value: "repolist".
> +
> +default-page-repo::
> +	Specifies the default page for repositories. Possible values are
> +	"about", "summary", "refs", "log", "tree", "commit", "diff" and
> +	"stats". Default value: "summary".
> +
>  email-filter::
>  	Specifies a command which will be invoked to format names and email
>  	address of committers, authors, and taggers, as represented in various
> diff --git a/cmd.c b/cmd.c
> index bf6d8f5..6a2a377 100644
> --- a/cmd.c
> +++ b/cmd.c
> @@ -51,13 +51,10 @@ static void about_fn(void)
>  			free(redirect);
>  		} else if (ctx.repo->readme.nr)
>  			cgit_print_repo_readme(ctx.qry.path);
> -		else if (ctx.repo->homepage)
> -			cgit_redirect(ctx.repo->homepage, false);
>  		else {
> -			char *currenturl = cgit_currenturl();
> -			char *redirect = fmtalloc("%s../", currenturl);
> +			char *redirect = fmtalloc("%s%s/summary/",
> +				ctx.cfg.virtual_root, ctx.repo->url);
>  			cgit_redirect(redirect, false);
> -			free(currenturl);
>  			free(redirect);
>  		}
>  	} else
> @@ -196,9 +193,9 @@ struct cgit_cmd *cgit_get_cmd(void)
> 
>  	if (ctx.qry.page == NULL) {
>  		if (ctx.repo)
> -			ctx.qry.page = "summary";
> +			ctx.qry.page = ctx.cfg.default_page_repo;
>  		else
> -			ctx.qry.page = "repolist";
> +			ctx.qry.page = ctx.cfg.default_page;
>  	}
> 
>  	for (i = 0; i < sizeof(cmds)/sizeof(*cmds); i++)
> diff --git a/ui-repolist.c b/ui-repolist.c
> index 7cf7638..a49f457 100644
> --- a/ui-repolist.c
> +++ b/ui-repolist.c
> @@ -321,7 +321,7 @@ void cgit_print_repolist(void)
>  		}
>  		htmlf("<tr><td class='%s'>",
>  		      !sorted && section ? "sublevel-repo" : "toplevel-repo");
> -		cgit_summary_link(ctx.repo->name, ctx.repo->name, NULL, NULL);
> +		cgit_repo_link(ctx.repo->name, ctx.repo->name, NULL, NULL);
>  		html("</td><td>");
>  		repourl = cgit_repourl(ctx.repo->url);
>  		html_link_open(repourl, NULL, NULL);
> diff --git a/ui-shared.c b/ui-shared.c
> index d2358f2..bb3050e 100644
> --- a/ui-shared.c
> +++ b/ui-shared.c
> @@ -327,10 +327,16 @@ static void reporevlink(const char *page, const char *name, const char *title,
>  	html("</a>");
>  }
> 
> +void cgit_repo_link(const char *name, const char *title, const char *class,
> +			const char *head)
> +{
> +	reporevlink(NULL, name, title, class, head, NULL, NULL);
> +}
> +
>  void cgit_summary_link(const char *name, const char *title, const char *class,
>  		       const char *head)
>  {
> -	reporevlink(NULL, name, title, class, head, NULL, NULL);
> +	reporevlink("summary", name, title, class, head, NULL, NULL);
>  }
> 
>  void cgit_tag_link(const char *name, const char *title, const char *class,
> @@ -994,7 +1000,7 @@ static void print_header(void)
>  	if (ctx.repo) {
>  		cgit_index_link("index", NULL, NULL, NULL, NULL, 0, 1);
>  		html(" : ");
> -		cgit_summary_link(ctx.repo->name, ctx.repo->name, NULL, NULL);
> +		cgit_repo_link(ctx.repo->name, ctx.repo->name, NULL, NULL);
>  		if (ctx.env.authenticated) {
>  			html("</td><td class='form'>");
>  			html("<form method='get'>\n");
> @@ -1083,7 +1089,7 @@ void cgit_print_pageheader(void)
>  		html("</form>\n");
>  	} else if (ctx.env.authenticated) {
>  		char *currenturl = cgit_currenturl();
> -		site_link(NULL, "index", NULL, hc("repolist"), NULL, NULL, 0, 1);
> +		site_link("repolist", "index", NULL, hc("repolist"), NULL, NULL, 0, 1);
>  		if (ctx.cfg.root_readme)
>  			site_link("about", "about", NULL, hc("about"),
>  				  NULL, NULL, 0, 1);
> diff --git a/ui-shared.h b/ui-shared.h
> index 6964873..4d14858 100644
> --- a/ui-shared.h
> +++ b/ui-shared.h
> @@ -17,6 +17,8 @@ extern void cgit_add_clone_urls(void (*fn)(const char *));
> 
>  extern void cgit_index_link(const char *name, const char *title,
>  			    const char *class, const char *pattern, const char *sort, int ofs, int always_root);
> +extern void cgit_repo_link(const char *name, const char *title,
> +				  const char *class, const char *head);
>  extern void cgit_summary_link(const char *name, const char *title,
>  			      const char *class, const char *head);
>  extern void cgit_tag_link(const char *name, const char *title,
> --
> 2.22.0
> 
> _______________________________________________
> CGit mailing list
> CGit at lists.zx2c4.com
> https://lists.zx2c4.com/mailman/listinfo/cgit


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH] Make default pages configurable
  2019-08-15 10:26 ` john
@ 2019-08-15 10:56   ` 
  2019-08-15 12:50   ` [PATCH v2] " 
  1 sibling, 0 replies; 9+ messages in thread
From:  @ 2019-08-15 10:56 UTC (permalink / raw)


> Missing sign-off.  See https://developercertificate.org/ for what this
> means.

Sorry, I didn't realise signing off was required. Is this mentioned somewhere,
or just a tacit convention in most open-source projects?

> The commit message also needs to explain *why* we want this change in
> addition to how the change is implemented.

The rationale for the change seemed pretty obvious, but I'll make sure to
include a sentence or two about it.

Should I send the new patch as a new thread, or simply reply to this one?


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH v2] Make default pages configurable
  2019-08-15 10:26 ` john
  2019-08-15 10:56   ` 
@ 2019-08-15 12:50   ` 
  2019-08-19  8:31     ` actionmystique
  1 sibling, 1 reply; 9+ messages in thread
From:  @ 2019-08-15 12:50 UTC (permalink / raw)


It would be nice to be able to configure the default page to use for the
root site and repositories. For example, it might make more sense to
have "about" or "tree" as the default landing page for certain repos,
instead of the default "summary".

This patch introduces the following configuration settings:
- "root-default-page": sets the default page for the root site
  (defaults to "repolist")
- "repo.default-page": sets the default page for individual repos
  (defaults to "summary")
- "default-page": global default value for "repo.default-page"

The following accessory changes were required to make this work:
- the "index" tab link on root pages and the "summary" tab link on repo
  pages now explicitly point to their respective targets instead of
  pointing to the site/repo root
- trying to access the "about" page on a repository without one results
  in being redirected to the "summary" page explicitly

Signed-off-by: Na?m Favier <fnaim42 at gmail.com>
---
Hope this is better, I went all the way and added a per-repo setting too.

 cgit.c        | 10 ++++++++++
 cgit.h        |  3 +++
 cgitrc.5.txt  | 14 ++++++++++++++
 cmd.c         | 18 +++++++++---------
 ui-repolist.c |  2 +-
 ui-shared.c   | 12 +++++++++---
 ui-shared.h   |  2 ++
 7 files changed, 48 insertions(+), 13 deletions(-)

diff --git a/cgit.c b/cgit.c
index 2910d4b..89a5ba9 100644
--- a/cgit.c
+++ b/cgit.c
@@ -46,6 +46,8 @@ static void repo_config(struct cgit_repo *repo, const char *name, const char *va
 		repo->homepage = xstrdup(value);
 	else if (!strcmp(name, "defbranch"))
 		repo->defbranch = xstrdup(value);
+	else if (!strcmp(name, "default-page"))
+		repo->default_page = xstrdup(value);
 	else if (!strcmp(name, "extra-head-content"))
 		repo->extra_head_content = xstrdup(value);
 	else if (!strcmp(name, "snapshots"))
@@ -131,6 +133,8 @@ static void config_cb(const char *name, const char *value)
 		ctx.cfg.root_desc = xstrdup(value);
 	else if (!strcmp(name, "root-readme"))
 		ctx.cfg.root_readme = xstrdup(value);
+	else if (!strcmp(name, "root-default-page"))
+		ctx.cfg.root_default_page = xstrdup(value);
 	else if (!strcmp(name, "css"))
 		ctx.cfg.css = xstrdup(value);
 	else if (!strcmp(name, "favicon"))
@@ -145,6 +149,8 @@ static void config_cb(const char *name, const char *value)
 		ctx.cfg.logo = xstrdup(value);
 	else if (!strcmp(name, "logo-link"))
 		ctx.cfg.logo_link = xstrdup(value);
+	else if (!strcmp(name, "default-page"))
+		ctx.cfg.default_page = xstrdup(value);
 	else if (!strcmp(name, "module-link"))
 		ctx.cfg.module_link = xstrdup(value);
 	else if (!strcmp(name, "strict-export"))
@@ -367,6 +373,7 @@ static void prepare_context(void)
 	ctx.cfg.branch_sort = 0;
 	ctx.cfg.commit_sort = 0;
 	ctx.cfg.css = "/cgit.css";
+	ctx.cfg.default_page= "summary";
 	ctx.cfg.logo = "/cgit.png";
 	ctx.cfg.favicon = "/favicon.ico";
 	ctx.cfg.local_time = 0;
@@ -387,6 +394,7 @@ static void prepare_context(void)
 	ctx.cfg.robots = "index, nofollow";
 	ctx.cfg.root_title = "Git repository browser";
 	ctx.cfg.root_desc = "a fast webinterface for the git dscm";
+	ctx.cfg.root_default_page = "repolist";
 	ctx.cfg.scan_hidden_path = 0;
 	ctx.cfg.script_name = CGIT_SCRIPT_NAME;
 	ctx.cfg.section = "";
@@ -801,6 +809,8 @@ static void print_repo(FILE *f, struct cgit_repo *repo)
 	}
 	if (repo->defbranch)
 		fprintf(f, "repo.defbranch=%s\n", repo->defbranch);
+	if (repo->default_page)
+		fprintf(f, "repo.default-page=%s\n", repo->default_page);
 	if (repo->extra_head_content)
 		fprintf(f, "repo.extra-head-content=%s\n", repo->extra_head_content);
 	if (repo->module_link)
diff --git a/cgit.h b/cgit.h
index 7ec46b4..06024ea 100644
--- a/cgit.h
+++ b/cgit.h
@@ -86,6 +86,7 @@ struct cgit_repo {
 	char *owner;
 	char *homepage;
 	char *defbranch;
+	char *default_page;
 	char *module_link;
 	struct string_list readme;
 	char *section;
@@ -196,6 +197,7 @@ struct cgit_config {
 	char *clone_prefix;
 	char *clone_url;
 	char *css;
+	char *default_page;
 	char *favicon;
 	char *footer;
 	char *head_include;
@@ -210,6 +212,7 @@ struct cgit_config {
 	char *root_title;
 	char *root_desc;
 	char *root_readme;
+	char *root_default_page;
 	char *script_name;
 	char *section;
 	char *repository_sort;
diff --git a/cgitrc.5.txt b/cgitrc.5.txt
index ba77826..2e59180 100644
--- a/cgitrc.5.txt
+++ b/cgitrc.5.txt
@@ -128,6 +128,12 @@ css::
 	Url which specifies the css document to include in all cgit pages.
 	Default value: "/cgit.css".

+default-page::
+	Specifies the default page for repositories. This setting is only used
+	if `repo.default-page` is unspecified. Possible values: "about",
+	"summary", "refs", "log", "tree", "commit", "diff", "stats".  Default
+	value: "summary".
+
 email-filter::
 	Specifies a command which will be invoked to format names and email
 	address of committers, authors, and taggers, as represented in various
@@ -352,6 +358,10 @@ robots::
 	Text used as content for the "robots" meta-tag. Default value:
 	"index, nofollow".

+root-default-page::
+	Specifies the default root page. Possible values are "repolist" and
+	"about". Default value: "repolist".
+
 root-desc::
 	Text printed below the heading on the repository index page. Default
 	value: "a fast webinterface for the git dscm".
@@ -472,6 +482,10 @@ repo.commit-sort::
 	ordering. If unset, the default ordering of "git log" is used. Default
 	value: unset.

+repo.default-page::
+	Specifies the default page for the repository. Default value: global
+	default-page.
+
 repo.defbranch::
 	The name of the default branch for this repository. If no such branch
 	exists in the repository, the first branch name (when sorted) is used
diff --git a/cmd.c b/cmd.c
index bf6d8f5..9eda2c7 100644
--- a/cmd.c
+++ b/cmd.c
@@ -51,13 +51,10 @@ static void about_fn(void)
 			free(redirect);
 		} else if (ctx.repo->readme.nr)
 			cgit_print_repo_readme(ctx.qry.path);
-		else if (ctx.repo->homepage)
-			cgit_redirect(ctx.repo->homepage, false);
 		else {
-			char *currenturl = cgit_currenturl();
-			char *redirect = fmtalloc("%s../", currenturl);
+			char *redirect = fmtalloc("%s%s/summary/",
+				ctx.cfg.virtual_root, ctx.repo->url);
 			cgit_redirect(redirect, false);
-			free(currenturl);
 			free(redirect);
 		}
 	} else
@@ -195,10 +192,13 @@ struct cgit_cmd *cgit_get_cmd(void)
 	int i;

 	if (ctx.qry.page == NULL) {
-		if (ctx.repo)
-			ctx.qry.page = "summary";
-		else
-			ctx.qry.page = "repolist";
+		if (ctx.repo) {
+			if (ctx.repo->default_page && *ctx.repo->default_page)
+				ctx.qry.page = ctx.repo->default_page;
+			else
+				ctx.qry.page = ctx.cfg.default_page;
+		} else
+			ctx.qry.page = ctx.cfg.root_default_page;
 	}

 	for (i = 0; i < sizeof(cmds)/sizeof(*cmds); i++)
diff --git a/ui-repolist.c b/ui-repolist.c
index 7cf7638..a49f457 100644
--- a/ui-repolist.c
+++ b/ui-repolist.c
@@ -321,7 +321,7 @@ void cgit_print_repolist(void)
 		}
 		htmlf("<tr><td class='%s'>",
 		      !sorted && section ? "sublevel-repo" : "toplevel-repo");
-		cgit_summary_link(ctx.repo->name, ctx.repo->name, NULL, NULL);
+		cgit_repo_link(ctx.repo->name, ctx.repo->name, NULL, NULL);
 		html("</td><td>");
 		repourl = cgit_repourl(ctx.repo->url);
 		html_link_open(repourl, NULL, NULL);
diff --git a/ui-shared.c b/ui-shared.c
index d2358f2..bb3050e 100644
--- a/ui-shared.c
+++ b/ui-shared.c
@@ -327,10 +327,16 @@ static void reporevlink(const char *page, const char *name, const char *title,
 	html("</a>");
 }

+void cgit_repo_link(const char *name, const char *title, const char *class,
+			const char *head)
+{
+	reporevlink(NULL, name, title, class, head, NULL, NULL);
+}
+
 void cgit_summary_link(const char *name, const char *title, const char *class,
 		       const char *head)
 {
-	reporevlink(NULL, name, title, class, head, NULL, NULL);
+	reporevlink("summary", name, title, class, head, NULL, NULL);
 }

 void cgit_tag_link(const char *name, const char *title, const char *class,
@@ -994,7 +1000,7 @@ static void print_header(void)
 	if (ctx.repo) {
 		cgit_index_link("index", NULL, NULL, NULL, NULL, 0, 1);
 		html(" : ");
-		cgit_summary_link(ctx.repo->name, ctx.repo->name, NULL, NULL);
+		cgit_repo_link(ctx.repo->name, ctx.repo->name, NULL, NULL);
 		if (ctx.env.authenticated) {
 			html("</td><td class='form'>");
 			html("<form method='get'>\n");
@@ -1083,7 +1089,7 @@ void cgit_print_pageheader(void)
 		html("</form>\n");
 	} else if (ctx.env.authenticated) {
 		char *currenturl = cgit_currenturl();
-		site_link(NULL, "index", NULL, hc("repolist"), NULL, NULL, 0, 1);
+		site_link("repolist", "index", NULL, hc("repolist"), NULL, NULL, 0, 1);
 		if (ctx.cfg.root_readme)
 			site_link("about", "about", NULL, hc("about"),
 				  NULL, NULL, 0, 1);
diff --git a/ui-shared.h b/ui-shared.h
index 6964873..4d14858 100644
--- a/ui-shared.h
+++ b/ui-shared.h
@@ -17,6 +17,8 @@ extern void cgit_add_clone_urls(void (*fn)(const char *));

 extern void cgit_index_link(const char *name, const char *title,
 			    const char *class, const char *pattern, const char *sort, int ofs, int always_root);
+extern void cgit_repo_link(const char *name, const char *title,
+				  const char *class, const char *head);
 extern void cgit_summary_link(const char *name, const char *title,
 			      const char *class, const char *head);
 extern void cgit_tag_link(const char *name, const char *title,
--
2.22.0



^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH v2] Make default pages configurable
  2019-08-15 12:50   ` [PATCH v2] " 
@ 2019-08-19  8:31     ` actionmystique
  2019-08-19  9:44       ` 
  0 siblings, 1 reply; 9+ messages in thread
From: actionmystique @ 2019-08-19  8:31 UTC (permalink / raw)


I tried to apply your patch to v1.2.1-24-ge1ad15d (after having removed
lines 2 & 3), I get:
git apply --verbose ../default-pages.patch
error: corrupt patch at line 169

On Thu, Aug 15, 2019 at 2:50 PM Na?m Favier <fnaim42 at gmail.com> wrote:

> It would be nice to be able to configure the default page to use for the
> root site and repositories. For example, it might make more sense to
> have "about" or "tree" as the default landing page for certain repos,
> instead of the default "summary".
>
> This patch introduces the following configuration settings:
> - "root-default-page": sets the default page for the root site
>   (defaults to "repolist")
> - "repo.default-page": sets the default page for individual repos
>   (defaults to "summary")
> - "default-page": global default value for "repo.default-page"
>
> The following accessory changes were required to make this work:
> - the "index" tab link on root pages and the "summary" tab link on repo
>   pages now explicitly point to their respective targets instead of
>   pointing to the site/repo root
> - trying to access the "about" page on a repository without one results
>   in being redirected to the "summary" page explicitly
>
> Signed-off-by: Na?m Favier <fnaim42 at gmail.com>
> ---
> Hope this is better, I went all the way and added a per-repo setting too.
>
>  cgit.c        | 10 ++++++++++
>  cgit.h        |  3 +++
>  cgitrc.5.txt  | 14 ++++++++++++++
>  cmd.c         | 18 +++++++++---------
>  ui-repolist.c |  2 +-
>  ui-shared.c   | 12 +++++++++---
>  ui-shared.h   |  2 ++
>  7 files changed, 48 insertions(+), 13 deletions(-)
>
> diff --git a/cgit.c b/cgit.c
> index 2910d4b..89a5ba9 100644
> --- a/cgit.c
> +++ b/cgit.c
> @@ -46,6 +46,8 @@ static void repo_config(struct cgit_repo *repo, const
> char *name, const char *va
>                 repo->homepage = xstrdup(value);
>         else if (!strcmp(name, "defbranch"))
>                 repo->defbranch = xstrdup(value);
> +       else if (!strcmp(name, "default-page"))
> +               repo->default_page = xstrdup(value);
>         else if (!strcmp(name, "extra-head-content"))
>                 repo->extra_head_content = xstrdup(value);
>         else if (!strcmp(name, "snapshots"))
> @@ -131,6 +133,8 @@ static void config_cb(const char *name, const char
> *value)
>                 ctx.cfg.root_desc = xstrdup(value);
>         else if (!strcmp(name, "root-readme"))
>                 ctx.cfg.root_readme = xstrdup(value);
> +       else if (!strcmp(name, "root-default-page"))
> +               ctx.cfg.root_default_page = xstrdup(value);
>         else if (!strcmp(name, "css"))
>                 ctx.cfg.css = xstrdup(value);
>         else if (!strcmp(name, "favicon"))
> @@ -145,6 +149,8 @@ static void config_cb(const char *name, const char
> *value)
>                 ctx.cfg.logo = xstrdup(value);
>         else if (!strcmp(name, "logo-link"))
>                 ctx.cfg.logo_link = xstrdup(value);
> +       else if (!strcmp(name, "default-page"))
> +               ctx.cfg.default_page = xstrdup(value);
>         else if (!strcmp(name, "module-link"))
>                 ctx.cfg.module_link = xstrdup(value);
>         else if (!strcmp(name, "strict-export"))
> @@ -367,6 +373,7 @@ static void prepare_context(void)
>         ctx.cfg.branch_sort = 0;
>         ctx.cfg.commit_sort = 0;
>         ctx.cfg.css = "/cgit.css";
> +       ctx.cfg.default_page= "summary";
>         ctx.cfg.logo = "/cgit.png";
>         ctx.cfg.favicon = "/favicon.ico";
>         ctx.cfg.local_time = 0;
> @@ -387,6 +394,7 @@ static void prepare_context(void)
>         ctx.cfg.robots = "index, nofollow";
>         ctx.cfg.root_title = "Git repository browser";
>         ctx.cfg.root_desc = "a fast webinterface for the git dscm";
> +       ctx.cfg.root_default_page = "repolist";
>         ctx.cfg.scan_hidden_path = 0;
>         ctx.cfg.script_name = CGIT_SCRIPT_NAME;
>         ctx.cfg.section = "";
> @@ -801,6 +809,8 @@ static void print_repo(FILE *f, struct cgit_repo *repo)
>         }
>         if (repo->defbranch)
>                 fprintf(f, "repo.defbranch=%s\n", repo->defbranch);
> +       if (repo->default_page)
> +               fprintf(f, "repo.default-page=%s\n", repo->default_page);
>         if (repo->extra_head_content)
>                 fprintf(f, "repo.extra-head-content=%s\n",
> repo->extra_head_content);
>         if (repo->module_link)
> diff --git a/cgit.h b/cgit.h
> index 7ec46b4..06024ea 100644
> --- a/cgit.h
> +++ b/cgit.h
> @@ -86,6 +86,7 @@ struct cgit_repo {
>         char *owner;
>         char *homepage;
>         char *defbranch;
> +       char *default_page;
>         char *module_link;
>         struct string_list readme;
>         char *section;
> @@ -196,6 +197,7 @@ struct cgit_config {
>         char *clone_prefix;
>         char *clone_url;
>         char *css;
> +       char *default_page;
>         char *favicon;
>         char *footer;
>         char *head_include;
> @@ -210,6 +212,7 @@ struct cgit_config {
>         char *root_title;
>         char *root_desc;
>         char *root_readme;
> +       char *root_default_page;
>         char *script_name;
>         char *section;
>         char *repository_sort;
> diff --git a/cgitrc.5.txt b/cgitrc.5.txt
> index ba77826..2e59180 100644
> --- a/cgitrc.5.txt
> +++ b/cgitrc.5.txt
> @@ -128,6 +128,12 @@ css::
>         Url which specifies the css document to include in all cgit pages.
>         Default value: "/cgit.css".
>
> +default-page::
> +       Specifies the default page for repositories. This setting is only
> used
> +       if `repo.default-page` is unspecified. Possible values: "about",
> +       "summary", "refs", "log", "tree", "commit", "diff", "stats".
> Default
> +       value: "summary".
> +
>  email-filter::
>         Specifies a command which will be invoked to format names and email
>         address of committers, authors, and taggers, as represented in
> various
> @@ -352,6 +358,10 @@ robots::
>         Text used as content for the "robots" meta-tag. Default value:
>         "index, nofollow".
>
> +root-default-page::
> +       Specifies the default root page. Possible values are "repolist" and
> +       "about". Default value: "repolist".
> +
>  root-desc::
>         Text printed below the heading on the repository index page.
> Default
>         value: "a fast webinterface for the git dscm".
> @@ -472,6 +482,10 @@ repo.commit-sort::
>         ordering. If unset, the default ordering of "git log" is used.
> Default
>         value: unset.
>
> +repo.default-page::
> +       Specifies the default page for the repository. Default value:
> global
> +       default-page.
> +
>  repo.defbranch::
>         The name of the default branch for this repository. If no such
> branch
>         exists in the repository, the first branch name (when sorted) is
> used
> diff --git a/cmd.c b/cmd.c
> index bf6d8f5..9eda2c7 100644
> --- a/cmd.c
> +++ b/cmd.c
> @@ -51,13 +51,10 @@ static void about_fn(void)
>                         free(redirect);
>                 } else if (ctx.repo->readme.nr)
>                         cgit_print_repo_readme(ctx.qry.path);
> -               else if (ctx.repo->homepage)
> -                       cgit_redirect(ctx.repo->homepage, false);
>                 else {
> -                       char *currenturl = cgit_currenturl();
> -                       char *redirect = fmtalloc("%s../", currenturl);
> +                       char *redirect = fmtalloc("%s%s/summary/",
> +                               ctx.cfg.virtual_root, ctx.repo->url);
>                         cgit_redirect(redirect, false);
> -                       free(currenturl);
>                         free(redirect);
>                 }
>         } else
> @@ -195,10 +192,13 @@ struct cgit_cmd *cgit_get_cmd(void)
>         int i;
>
>         if (ctx.qry.page == NULL) {
> -               if (ctx.repo)
> -                       ctx.qry.page = "summary";
> -               else
> -                       ctx.qry.page = "repolist";
> +               if (ctx.repo) {
> +                       if (ctx.repo->default_page &&
> *ctx.repo->default_page)
> +                               ctx.qry.page = ctx.repo->default_page;
> +                       else
> +                               ctx.qry.page = ctx.cfg.default_page;
> +               } else
> +                       ctx.qry.page = ctx.cfg.root_default_page;
>         }
>
>         for (i = 0; i < sizeof(cmds)/sizeof(*cmds); i++)
> diff --git a/ui-repolist.c b/ui-repolist.c
> index 7cf7638..a49f457 100644
> --- a/ui-repolist.c
> +++ b/ui-repolist.c
> @@ -321,7 +321,7 @@ void cgit_print_repolist(void)
>                 }
>                 htmlf("<tr><td class='%s'>",
>                       !sorted && section ? "sublevel-repo" :
> "toplevel-repo");
> -               cgit_summary_link(ctx.repo->name, ctx.repo->name, NULL,
> NULL);
> +               cgit_repo_link(ctx.repo->name, ctx.repo->name, NULL, NULL);
>                 html("</td><td>");
>                 repourl = cgit_repourl(ctx.repo->url);
>                 html_link_open(repourl, NULL, NULL);
> diff --git a/ui-shared.c b/ui-shared.c
> index d2358f2..bb3050e 100644
> --- a/ui-shared.c
> +++ b/ui-shared.c
> @@ -327,10 +327,16 @@ static void reporevlink(const char *page, const char
> *name, const char *title,
>         html("</a>");
>  }
>
> +void cgit_repo_link(const char *name, const char *title, const char
> *class,
> +                       const char *head)
> +{
> +       reporevlink(NULL, name, title, class, head, NULL, NULL);
> +}
> +
>  void cgit_summary_link(const char *name, const char *title, const char
> *class,
>                        const char *head)
>  {
> -       reporevlink(NULL, name, title, class, head, NULL, NULL);
> +       reporevlink("summary", name, title, class, head, NULL, NULL);
>  }
>
>  void cgit_tag_link(const char *name, const char *title, const char *class,
> @@ -994,7 +1000,7 @@ static void print_header(void)
>         if (ctx.repo) {
>                 cgit_index_link("index", NULL, NULL, NULL, NULL, 0, 1);
>                 html(" : ");
> -               cgit_summary_link(ctx.repo->name, ctx.repo->name, NULL,
> NULL);
> +               cgit_repo_link(ctx.repo->name, ctx.repo->name, NULL, NULL);
>                 if (ctx.env.authenticated) {
>                         html("</td><td class='form'>");
>                         html("<form method='get'>\n");
> @@ -1083,7 +1089,7 @@ void cgit_print_pageheader(void)
>                 html("</form>\n");
>         } else if (ctx.env.authenticated) {
>                 char *currenturl = cgit_currenturl();
> -               site_link(NULL, "index", NULL, hc("repolist"), NULL, NULL,
> 0, 1);
> +               site_link("repolist", "index", NULL, hc("repolist"), NULL,
> NULL, 0, 1);
>                 if (ctx.cfg.root_readme)
>                         site_link("about", "about", NULL, hc("about"),
>                                   NULL, NULL, 0, 1);
> diff --git a/ui-shared.h b/ui-shared.h
> index 6964873..4d14858 100644
> --- a/ui-shared.h
> +++ b/ui-shared.h
> @@ -17,6 +17,8 @@ extern void cgit_add_clone_urls(void (*fn)(const char
> *));
>
>  extern void cgit_index_link(const char *name, const char *title,
>                             const char *class, const char *pattern, const
> char *sort, int ofs, int always_root);
> +extern void cgit_repo_link(const char *name, const char *title,
> +                                 const char *class, const char *head);
>  extern void cgit_summary_link(const char *name, const char *title,
>                               const char *class, const char *head);
>  extern void cgit_tag_link(const char *name, const char *title,
> --
> 2.22.0
>
> _______________________________________________
> CGit mailing list
> CGit at lists.zx2c4.com
> https://lists.zx2c4.com/mailman/listinfo/cgit
>


-- 
Jean-Christophe
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.zx2c4.com/pipermail/cgit/attachments/20190819/f89afab6/attachment-0001.html>


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH v2] Make default pages configurable
  2019-08-19  8:31     ` actionmystique
@ 2019-08-19  9:44       ` 
  2019-08-20  9:09         ` actionmystique
  0 siblings, 1 reply; 9+ messages in thread
From:  @ 2019-08-19  9:44 UTC (permalink / raw)


On Mon, 19 Aug 2019 at 10:32, jean-christophe manciot
<actionmystique at gmail.com> wrote:
> I tried to apply your patch to v1.2.1-24-ge1ad15d (after having removed lines 2 & 3), I get:
> git apply --verbose ../default-pages.patch
> error: corrupt patch at line 169

Sorry, that's on your end. If you're using the Gmail web interface,
make sure to click "Show original" before you copy-and-paste, as Gmail
tends to add buttons and mangle messages in various ways.

Note that copying the patch and using git-apply(1) will give you the
changes, but not the commit message and author. The standard way to
apply a patch is to feed the whole message (headers included) to
git-am(1).

Cheers


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH v2] Make default pages configurable
  2019-08-19  9:44       ` 
@ 2019-08-20  9:09         ` actionmystique
  2019-08-20 11:28           ` 
  0 siblings, 1 reply; 9+ messages in thread
From: actionmystique @ 2019-08-20  9:09 UTC (permalink / raw)


>
> Sorry, that's on your end. If you're using the Gmail web interface,
> make sure to click "Show original" before you copy-and-paste, as Gmail
> tends to add buttons and mangle messages in various ways.
>

   -  "Show original" displays an encrypted message
   - the patch from a non-gmail source
   <https://www.mail-archive.com/cgit at lists.zx2c4.com/msg02904.html> after
   removing the non-original added new lines (as *attached below*) raises
   multiple issues, maybe because all tabulations have been replaced by
   spaces:

*git checkout -f v1.2.1-24-ge1ad15d*
*git apply --verbose ../default-pages.patch*
Checking patch cgit.c...
error: while searching for:
               repo->homepage = xstrdup(value);
       else if (!strcmp(name, "defbranch"))
               repo->defbranch = xstrdup(value);
       else if (!strcmp(name, "extra-head-content"))
               repo->extra_head_content = xstrdup(value);
       else if (!strcmp(name, "snapshots"))

error: patch failed: cgit.c:46
error: cgit.c: patch does not apply
Checking patch cgit.h...
error: while searching for:
       char *owner;
       char *homepage;
       char *defbranch;
       char *module_link;
       struct string_list readme;
       char *section;

error: patch failed: cgit.h:86
error: cgit.h: patch does not apply
Checking patch cgitrc.5.txt...
error: while searching for:
       Url which specifies the css document to include in all cgit pages.
       Default value: "/cgit.css".

email-filter::
       Specifies a command which will be invoked to format names and email
       address of committers, authors, and taggers, as represented in
various

error: patch failed: cgitrc.5.txt:128
error: cgitrc.5.txt: patch does not apply
Checking patch cmd.c...
error: while searching for:
                       free(redirect);
               } else if (ctx.repo->readme.nr)
                       cgit_print_repo_readme(ctx.qry.path);
               else if (ctx.repo->homepage)
                       cgit_redirect(ctx.repo->homepage, false);
               else {
                       char *currenturl = cgit_currenturl();
                       char *redirect = fmtalloc("%s../", currenturl);
                       cgit_redirect(redirect, false);
                       free(currenturl);
                       free(redirect);
               }
       } else

error: patch failed: cmd.c:51
error: cmd.c: patch does not apply
Checking patch ui-repolist.c...
error: while searching for:
               }
               htmlf("<tr><td class='%s'>",
                     !sorted && section ? "sublevel-repo" :
"toplevel-repo");
               cgit_summary_link(ctx.repo->name, ctx.repo->name, NULL,
NULL);
               html("</td><td>");
               repourl = cgit_repourl(ctx.repo->url);
               html_link_open(repourl, NULL, NULL);

error: patch failed: ui-repolist.c:321
error: ui-repolist.c: patch does not apply
Checking patch ui-shared.c...
error: while searching for:
       html("</a>");
}

void cgit_summary_link(const char *name, const char *title, const char
*class,
                      const char *head)
{
       reporevlink(NULL, name, title, class, head, NULL, NULL);
}

void cgit_tag_link(const char *name, const char *title, const char *class,

error: patch failed: ui-shared.c:327
error: ui-shared.c: patch does not apply
Checking patch ui-shared.h...
error: while searching for:

extern void cgit_index_link(const char *name, const char *title,
                           const char *class, const char *pattern, const
char *sort, int ofs, int always_root);
extern void cgit_summary_link(const char *name, const char *title,
                             const char *class, const char *head);
extern void cgit_tag_link(const char *name, const char *title,

error: patch failed: ui-shared.h:17
error: ui-shared.h: patch does not apply

Could you attach the correct patch in your answer that we could apply to
the latest master commit?

--
Jean-Christophe
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.zx2c4.com/pipermail/cgit/attachments/20190820/819ce838/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: default-pages.patch
Type: text/x-patch
Size: 9941 bytes
Desc: not available
URL: <http://lists.zx2c4.com/pipermail/cgit/attachments/20190820/819ce838/attachment.bin>


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH v2] Make default pages configurable
  2019-08-20  9:09         ` actionmystique
@ 2019-08-20 11:28           ` 
  2019-08-21 14:50             ` actionmystique
  0 siblings, 1 reply; 9+ messages in thread
From:  @ 2019-08-20 11:28 UTC (permalink / raw)


>  "Show original" displays an encrypted message

That's curious, as no encryption was used on my end.

> the patch from a non-gmail source after removing the non-original added new lines (as attached below) raises multiple issues, maybe because all tabulations have been replaced by spaces:

Weird and weirder. As you can see on the pipermail archive
(https://lists.zx2c4.com/pipermail/cgit/2019-August/004399.html), the
patch I sent uses tabs.

Anyway, here's the original patch attached.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Make-default-pages-configurable.patch
Type: text/x-patch
Size: 9649 bytes
Desc: not available
URL: <http://lists.zx2c4.com/pipermail/cgit/attachments/20190820/5f446254/attachment.bin>


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH v2] Make default pages configurable
  2019-08-20 11:28           ` 
@ 2019-08-21 14:50             ` actionmystique
  0 siblings, 0 replies; 9+ messages in thread
From: actionmystique @ 2019-08-21 14:50 UTC (permalink / raw)


Thanks:
-------------------------------------------------
Applying 'Make default pages configurable' patch
-------------------------------------------------
git apply --verbose ../0001-Make-default-pages-configurable.patch
Checking patch cgit.c...
Checking patch cgit.h...
Checking patch cgitrc.5.txt...
Checking patch cmd.c...
Checking patch ui-repolist.c...
Checking patch ui-shared.c...
Hunk #2 succeeded at 1006 (offset 6 lines).
Hunk #3 succeeded at 1095 (offset 6 lines).
Checking patch ui-shared.h...
Applied patch cgit.c cleanly.
Applied patch cgit.h cleanly.
Applied patch cgitrc.5.txt cleanly.
Applied patch cmd.c cleanly.
Applied patch ui-repolist.c cleanly.
Applied patch ui-shared.c cleanly.
Applied patch ui-shared.h cleanly.

Nice work! I've tried the simple "default-page=about" setting in
/etc/cgitrc: it works beautifully.

On Tue, Aug 20, 2019 at 1:28 PM Na?m Favier <fnaim42 at gmail.com> wrote:

> >  "Show original" displays an encrypted message
>
> That's curious, as no encryption was used on my end.
>
> > the patch from a non-gmail source after removing the non-original added
> new lines (as attached below) raises multiple issues, maybe because all
> tabulations have been replaced by spaces:
>
> Weird and weirder. As you can see on the pipermail archive
> (https://lists.zx2c4.com/pipermail/cgit/2019-August/004399.html), the
> patch I sent uses tabs.
>
> Anyway, here's the original patch attached.
>


-- 
Jean-Christophe
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.zx2c4.com/pipermail/cgit/attachments/20190821/04a93c65/attachment.html>


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2019-08-21 14:50 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-13 17:22 [PATCH] Make default pages configurable 
2019-08-15 10:26 ` john
2019-08-15 10:56   ` 
2019-08-15 12:50   ` [PATCH v2] " 
2019-08-19  8:31     ` actionmystique
2019-08-19  9:44       ` 
2019-08-20  9:09         ` actionmystique
2019-08-20 11:28           ` 
2019-08-21 14:50             ` actionmystique

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).