From: ranger at risk.ee (The Ranger)
Subject: [PATCH 07/07] Close filter only if it was opened.
Date: Fri, 27 Nov 2015 20:46:45 -0000 [thread overview]
Message-ID: <1448657229.483934.7307.nullmailer@cypher.risk.ee> (raw)
---
scan-tree.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/scan-tree.c b/scan-tree.c
index 7490e74..9909587 100644
--- a/scan-tree.c
+++ b/scan-tree.c
@@ -74,7 +74,8 @@ static char *xstrrchr(char *s, char *from, int c)
return from < s ? NULL : from;
}
-static int open_project_filter(const char *action, const char *repo) {
+static int open_project_filter(const char *action, const char *repo)
+{
return cgit_open_filter(ctx.cfg.project_filter, action, repo,
ctx.env.remote_user ? ctx.env.remote_user : "",
ctx.env.server_name ? ctx.env.server_name : "",
@@ -274,8 +275,7 @@ void scan_projects(const char *path, const char *projectsfile, repo_config_fn fn
void scan_tree(const char *path, repo_config_fn fn)
{
- if (ctx.cfg.project_filter) {
- open_project_filter("init", path);
+ if (ctx.cfg.project_filter && !open_project_filter("init", path)) {
cgit_close_filter(ctx.cfg.project_filter);
}
--
2.1.4
reply other threads:[~2015-11-27 20:46 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1448657229.483934.7307.nullmailer@cypher.risk.ee \
--to=cgit@lists.zx2c4.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).