List for cgit developers and users
 help / color / mirror / Atom feed
* [PATCH] Fix processing of repo.hide and repo.ignore
@ 2015-08-10  7:45 hacking
  2015-08-10  8:31 ` john
  0 siblings, 1 reply; 6+ messages in thread
From: hacking @ 2015-08-10  7:45 UTC (permalink / raw)


If the global option enable-filter-overrides is set to 1 the repo-specific
options repo.hide and repo.ignore never got processed.

Signed-off-by: Daniel Reichelt <hacking at nachtgeist.net>
---
 cgit.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/cgit.c b/cgit.c
index ae413c6..8c9cfb5 100644
--- a/cgit.c
+++ b/cgit.c
@@ -82,6 +82,10 @@ static void repo_config(struct cgit_repo *repo, const char *name, const char *va
 		repo->logo = xstrdup(value);
 	else if (!strcmp(name, "logo-link") && value != NULL)
 		repo->logo_link = xstrdup(value);
+	else if (!strcmp(name, "hide"))
+		repo->hide = atoi(value);
+	else if (!strcmp(name, "ignore"))
+		repo->ignore = atoi(value);
 	else if (ctx.cfg.enable_filter_overrides) {
 		if (!strcmp(name, "about-filter"))
 			repo->about_filter = cgit_new_filter(value, ABOUT);
@@ -93,10 +97,6 @@ static void repo_config(struct cgit_repo *repo, const char *name, const char *va
 			repo->email_filter = cgit_new_filter(value, EMAIL);
 		else if (!strcmp(name, "owner-filter"))
 			repo->owner_filter = cgit_new_filter(value, OWNER);
-	} else if (!strcmp(name, "hide")) {
-		repo->hide = atoi(value);
-	} else if (!strcmp(name, "ignore")) {
-		repo->ignore = atoi(value);
 	}
 }
 
-- 
2.1.4



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

* [PATCH] Fix processing of repo.hide and repo.ignore
  2015-08-10  7:45 [PATCH] Fix processing of repo.hide and repo.ignore hacking
@ 2015-08-10  8:31 ` john
  2015-08-12 12:08   ` Jason
  0 siblings, 1 reply; 6+ messages in thread
From: john @ 2015-08-10  8:31 UTC (permalink / raw)


On Mon, Aug 10, 2015 at 09:45:48AM +0200, Daniel Reichelt wrote:
> If the global option enable-filter-overrides is set to 1 the repo-specific
> options repo.hide and repo.ignore never got processed.
> 
> Signed-off-by: Daniel Reichelt <hacking at nachtgeist.net>

Reviewed-by: John Keeping <john at keeping.me.uk>

> ---
>  cgit.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/cgit.c b/cgit.c
> index ae413c6..8c9cfb5 100644
> --- a/cgit.c
> +++ b/cgit.c
> @@ -82,6 +82,10 @@ static void repo_config(struct cgit_repo *repo, const char *name, const char *va
>  		repo->logo = xstrdup(value);
>  	else if (!strcmp(name, "logo-link") && value != NULL)
>  		repo->logo_link = xstrdup(value);
> +	else if (!strcmp(name, "hide"))
> +		repo->hide = atoi(value);
> +	else if (!strcmp(name, "ignore"))
> +		repo->ignore = atoi(value);
>  	else if (ctx.cfg.enable_filter_overrides) {
>  		if (!strcmp(name, "about-filter"))
>  			repo->about_filter = cgit_new_filter(value, ABOUT);
> @@ -93,10 +97,6 @@ static void repo_config(struct cgit_repo *repo, const char *name, const char *va
>  			repo->email_filter = cgit_new_filter(value, EMAIL);
>  		else if (!strcmp(name, "owner-filter"))
>  			repo->owner_filter = cgit_new_filter(value, OWNER);
> -	} else if (!strcmp(name, "hide")) {
> -		repo->hide = atoi(value);
> -	} else if (!strcmp(name, "ignore")) {
> -		repo->ignore = atoi(value);
>  	}
>  }
>  
> -- 
> 2.1.4


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

* [PATCH] Fix processing of repo.hide and repo.ignore
  2015-08-10  8:31 ` john
@ 2015-08-12 12:08   ` Jason
  0 siblings, 0 replies; 6+ messages in thread
From: Jason @ 2015-08-12 12:08 UTC (permalink / raw)


Merged, thanks.

http://git.zx2c4.com/cgit/commit/?id=dc41a0018058c81ee9a0a2dc6e89f737d7c1c966
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.zx2c4.com/pipermail/cgit/attachments/20150812/d0c36fe2/attachment.html>


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

* [PATCH] Fix processing of repo.hide and repo.ignore
  2015-08-07  8:14 ` john
@ 2015-08-10  7:45   ` hacking
  0 siblings, 0 replies; 6+ messages in thread
From: hacking @ 2015-08-10  7:45 UTC (permalink / raw)


> Missing sign-off (see [1] for what this means).  Also please try to send
> patches inline instead of as attachments; "git format-patch" will do
> this.
> 
> The patch itself looks good to me.
> 
> [1] https://github.com/git/git/blob/v2.5.0/Documentation/SubmittingPatches#L234

Thanks for the heads-up, John.

Here we go again, with sign-off tag and inline...



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

* [PATCH] Fix processing of repo.hide and repo.ignore
  2015-08-07  5:09 hacking
@ 2015-08-07  8:14 ` john
  2015-08-10  7:45   ` hacking
  0 siblings, 1 reply; 6+ messages in thread
From: john @ 2015-08-07  8:14 UTC (permalink / raw)


On Fri, Aug 07, 2015 at 07:09:28AM +0200, Daniel Reichelt wrote:
> please find attached a patch which fixes processing of repo.hide and
> repo.ignore.
> These options currently get ignored, if the global option
> enable-filter-overrides is enabled.
> 
> Please CC me on replies, I'm not subscribed.
> 
> >From ebc76bf727aba915536f15a6243f301340c29a27 Mon Sep 17 00:00:00 2001
> From: Daniel Reichelt <hacking at nachtgeist.net>
> Date: Fri, 7 Aug 2015 06:21:25 +0200
> Subject: [PATCH] Fix processing of repo.hide and repo.ignore
> 
> If the global option enable-filter-overrides is set to 1 the repo-specific
> options repo.hide and repo.ignore never got processed.

Missing sign-off (see [1] for what this means).  Also please try to send
patches inline instead of as attachments; "git format-patch" will do
this.

The patch itself looks good to me.

[1] https://github.com/git/git/blob/v2.5.0/Documentation/SubmittingPatches#L234

> ---
>  cgit.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/cgit.c b/cgit.c
> index ae413c6..8c9cfb5 100644
> --- a/cgit.c
> +++ b/cgit.c
> @@ -82,6 +82,10 @@ static void repo_config(struct cgit_repo *repo, const char *name, const char *va
>  		repo->logo = xstrdup(value);
>  	else if (!strcmp(name, "logo-link") && value != NULL)
>  		repo->logo_link = xstrdup(value);
> +	else if (!strcmp(name, "hide"))
> +		repo->hide = atoi(value);
> +	else if (!strcmp(name, "ignore"))
> +		repo->ignore = atoi(value);
>  	else if (ctx.cfg.enable_filter_overrides) {
>  		if (!strcmp(name, "about-filter"))
>  			repo->about_filter = cgit_new_filter(value, ABOUT);
> @@ -93,10 +97,6 @@ static void repo_config(struct cgit_repo *repo, const char *name, const char *va
>  			repo->email_filter = cgit_new_filter(value, EMAIL);
>  		else if (!strcmp(name, "owner-filter"))
>  			repo->owner_filter = cgit_new_filter(value, OWNER);
> -	} else if (!strcmp(name, "hide")) {
> -		repo->hide = atoi(value);
> -	} else if (!strcmp(name, "ignore")) {
> -		repo->ignore = atoi(value);
>  	}
>  }
>  
> -- 
> 2.1.4


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

* [PATCH] Fix processing of repo.hide and repo.ignore
@ 2015-08-07  5:09 hacking
  2015-08-07  8:14 ` john
  0 siblings, 1 reply; 6+ messages in thread
From: hacking @ 2015-08-07  5:09 UTC (permalink / raw)


Hi,

please find attached a patch which fixes processing of repo.hide and
repo.ignore.
These options currently get ignored, if the global option
enable-filter-overrides is enabled.

Please CC me on replies, I'm not subscribed.

Cheers
Daniel

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Fix-processing-of-repo.hide-and-repo.ignore.patch
Type: text/x-patch
Size: 1417 bytes
Desc: not available
URL: <http://lists.zx2c4.com/pipermail/cgit/attachments/20150807/9131be61/attachment.bin>


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

end of thread, other threads:[~2015-08-12 12:08 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-10  7:45 [PATCH] Fix processing of repo.hide and repo.ignore hacking
2015-08-10  8:31 ` john
2015-08-12 12:08   ` Jason
  -- strict thread matches above, loose matches on Subject: below --
2015-08-07  5:09 hacking
2015-08-07  8:14 ` john
2015-08-10  7:45   ` hacking

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).