diff options
author | Robby Workman <rworkman@slackbuilds.org> | 2017-08-24 19:22:28 -0500 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2017-08-26 07:20:38 +0700 |
commit | 4174da45a36fdf2f65914f22865dcc48433554c2 (patch) | |
tree | 14e161231bc5a8675857dbd5e124af8cc5864659 /development/cgit/patches/0014-cgit-don-t-set-vpath-unless-repo-is-set.patch | |
parent | df75f0401ee693208abfaf397f480ae1f61862d1 (diff) | |
download | slackbuilds-4174da45a36fdf2f65914f22865dcc48433554c2.tar.gz |
development/cgit: Include some upstream git patches
Some general bugfixes, but more importantly, patch 0005 fixes
a segfault in git's pathspec.c that we were seeing on the
SBo git server.
Thanks to John Keeping (cgit contributor) for helping with
debug suggestions and identifying the specific commit we
needed to fix it.
Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
Diffstat (limited to 'development/cgit/patches/0014-cgit-don-t-set-vpath-unless-repo-is-set.patch')
-rw-r--r-- | development/cgit/patches/0014-cgit-don-t-set-vpath-unless-repo-is-set.patch | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/development/cgit/patches/0014-cgit-don-t-set-vpath-unless-repo-is-set.patch b/development/cgit/patches/0014-cgit-don-t-set-vpath-unless-repo-is-set.patch new file mode 100644 index 0000000000..1038a44b8f --- /dev/null +++ b/development/cgit/patches/0014-cgit-don-t-set-vpath-unless-repo-is-set.patch @@ -0,0 +1,47 @@ +From 113f4b85886bc5eb6b319fd048623b8d43b7bce0 Mon Sep 17 00:00:00 2001 +From: John Keeping <john@keeping.me.uk> +Date: Sun, 19 Feb 2017 12:02:37 +0000 +Subject: [PATCH 14/15] cgit: don't set vpath unless repo is set + +After the previous two patches, this can be classified as a tidy up +rather than a bug fix, but I think it makes sense to group all of the +tests together before setting up the environment for the command to +execute. + +Signed-off-by: John Keeping <john@keeping.me.uk> +--- + cgit.c | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +diff --git a/cgit.c b/cgit.c +index 1075753..1dae4b8 100644 +--- a/cgit.c ++++ b/cgit.c +@@ -726,18 +726,18 @@ static void process_request(void) + return; + } + +- /* If cmd->want_vpath is set, assume ctx.qry.path contains a "virtual" +- * in-project path limit to be made available at ctx.qry.vpath. +- * Otherwise, no path limit is in effect (ctx.qry.vpath = NULL). +- */ +- ctx.qry.vpath = cmd->want_vpath ? ctx.qry.path : NULL; +- + if (cmd->want_repo && !ctx.repo) { + cgit_print_error_page(400, "Bad request", + "No repository selected"); + return; + } + ++ /* If cmd->want_vpath is set, assume ctx.qry.path contains a "virtual" ++ * in-project path limit to be made available at ctx.qry.vpath. ++ * Otherwise, no path limit is in effect (ctx.qry.vpath = NULL). ++ */ ++ ctx.qry.vpath = cmd->want_vpath ? ctx.qry.path : NULL; ++ + if (ctx.repo && prepare_repo_cmd()) + return; + +-- +2.14.1 + |