Re: [PATCH v2 00/22] HTTP status code improvements

2015-08-14 Thread John Keeping
the pre field from struct cgit_cmd but forgot to update this macro. Signed-off-by: John Keeping j...@keeping.me.uk --- cmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd.c b/cmd.c index 20c80b0..c991092 100644 --- a/cmd.c +++ b/cmd.c @@ -142,7 +142,7 @@ static void tree_fn

Re: [PATCH 2/2] about: send images plain

2015-08-14 Thread John Keeping
On Fri, Aug 14, 2015 at 04:50:57PM +0200, Christian Hesse wrote: From: Christian Hesse m...@eworm.de The about page used to display just fine, but images were broken: The binary image data was embedded in html code. Use cgit_print_plain() to send images in plain mode and make them available

[PATCH v2 02/22] cgit: use cgit_print_error_page() where appropriate

2015-08-14 Thread John Keeping
These are more-or-less one-to-one translations but in the final hunk we gain an HTTP error code where we used to send 200 OK, which is an improvement. Signed-off-by: John Keeping j...@keeping.me.uk --- cgit.c | 27 +++ 1 file changed, 7 insertions(+), 20 deletions

[PATCH 8/8] filter: don't use dlsym unnecessarily

2015-08-13 Thread John Keeping
We only need to hook write() if Lua filter's are in use. If support has been disabled, remove the dependency on dlsym(). Signed-off-by: John Keeping j...@keeping.me.uk --- filter.c | 78 ++-- 1 file changed, 42 insertions(+), 36

[PATCH 4/8] configfile.c: don't include system headers directly

2015-08-13 Thread John Keeping
git-compat-util.h may define various values that affect the interpretation of system headers. In most places we include cgit.h first, which pulls in git-compat-util.h, but this file does not depend on anything else in CGit, so use git-compat-util.h directly. Signed-off-by: John Keeping j

[PATCH 0/8] Portability fixes

2015-08-13 Thread John Keeping
not already defined and git-compat-util.h defines it to 64 unconditionally. John Keeping (8): tests: allow shell to be overridden Makefile: include Git's config.mak.uname Remove redundant includes configfile.c: don't include system headers directly cache.c: fix header order cgit.h

[PATCH 7/8] ui-tree: use sane isgraph()

2015-08-13 Thread John Keeping
() using Git's sane isprint() and isspace() avoids all of these problems. Signed-off-by: John Keeping j...@keeping.me.uk --- cgit.h| 3 +++ ui-tree.c | 1 - 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/cgit.h b/cgit.h index 508179a..f327627 100644 --- a/cgit.h +++ b/cgit.h

[PATCH 1/8] tests: allow shell to be overridden

2015-08-13 Thread John Keeping
way that Git does. Signed-off-by: John Keeping j...@keeping.me.uk --- tests/Makefile | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/Makefile b/tests/Makefile index 1556475..65e1117 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -1,11 +1,15 @@ +include ../git

[PATCH 5/8] cache.c: fix header order

2015-08-13 Thread John Keeping
git-compat-util.h may define values that affect how system headers are interpreted, so move sys/sendfile.h after cgit.h (which includes git-compat-util.h). Signed-off-by: John Keeping j...@keeping.me.uk --- cache.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cache.c

[PATCH 3/8] Remove redundant includes

2015-08-13 Thread John Keeping
These are all included in git-compat-util.h (when necessary), which we include in cgit.h. Signed-off-by: John Keeping j...@keeping.me.uk --- filter.c | 6 -- html.c| 6 -- shared.c | 1 - ui-plain.c| 1 - ui-repolist.c | 1 - ui-summary.c | 1 - 6 files changed, 16

[PATCH 3/3] ui-shared: show full date in tooltip if longer ago than max_relative

2015-08-13 Thread John Keeping
that case to add the same tooltip. Signed-off-by: John Keeping j...@keeping.me.uk --- ui-shared.c | 4 1 file changed, 4 insertions(+) diff --git a/ui-shared.c b/ui-shared.c index 792f3ee..57d7336 100644 --- a/ui-shared.c +++ b/ui-shared.c @@ -644,7 +644,11 @@ void cgit_print_age(time_t t, time_t

Re: Stale Branches

2015-08-12 Thread John Keeping
On Wed, Aug 12, 2015 at 03:49:06PM +0200, Jason A. Donenfeld wrote: I'd like some review of a few branches that have been sitting for a while, and perhaps a rebased version: jk/http-status-codes: Should be pretty much okay and ready to merge, but John -- anything that needs to be done here?

[PATCH v4 1/2] shared: make cgit_diff_tree_cb public

2015-08-12 Thread John Keeping
This will allow us to use this nice wrapper function elsewhere, avoiding dealing with the diff queue when we only need to inspect a filepair. Signed-off-by: John Keeping j...@keeping.me.uk --- Unchanged since v2/3. cgit.h | 3 +++ shared.c | 4 ++-- 2 files changed, 5 insertions(+), 2

Re: [PATCH] contrib/hooks: add sample post-receive hook using agefile

2015-08-12 Thread John Keeping
Jason, did you decide not to apply this or was it just lost in the noise? [Thread starts here: http://article.gmane.org/gmane.comp.version-control.cgit/2258 ] On Tue, Dec 23, 2014 at 05:12:41PM +0100, Ferry Huberts wrote: On 23/12/14 16:48, John Keeping wrote: On Tue, Dec 23, 2014 at 04:15

Re: Fwd: Build failed in Jenkins: cgit - upstream - master #206 - remotes/origin/master - 30304d8

2015-08-12 Thread John Keeping
onto an updated upstream. Signed-off-by: John Keeping j...@keeping.me.uk --- ui-log.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ui-log.c b/ui-log.c index ff832ce..6bff948 100644 --- a/ui-log.c +++ b/ui-log.c @@ -476,7 +476,7 @@ void cgit_print_log(const char *tip, int

[PATCH 2/3] ui-shared: add cgit_blame_link()

2015-08-12 Thread John Keeping
--- ui-shared.c | 40 ui-shared.h | 3 +++ 2 files changed, 43 insertions(+) diff --git a/ui-shared.c b/ui-shared.c index ac5a287..da9c3d0 100644 --- a/ui-shared.c +++ b/ui-shared.c @@ -338,6 +338,46 @@ void cgit_log_link(const char *name, const char

[PATCH 1/3] ui-blame: add blame UI

2015-08-12 Thread John Keeping
This is disabled by default and needs to be turned on in the config file. Because libgit.a does not include the blame implementation (which lives in git/builtin/blame.c), this is implemented by executing a git-blame subprocess and parsing its output. Given how expensive the blame operation

[PATCH 0/3] Blame UI

2015-08-12 Thread John Keeping
/HEAD:/cgit.c John Keeping (3): ui-blame: add blame UI ui-shared: add cgit_blame_link() ui-tree: generate blame links cgit.c | 4 +- cgit.css | 4 ++ cgit.h | 3 + cgit.mk | 1 + cgitrc.5.txt | 4 ++ cmd.c| 7 +++ ui-blame.c | 202

[PATCH 3/3] ui-tree: generate blame links

2015-08-12 Thread John Keeping
--- ui-tree.c | 9 + 1 file changed, 9 insertions(+) diff --git a/ui-tree.c b/ui-tree.c index bbc468e..add0344 100644 --- a/ui-tree.c +++ b/ui-tree.c @@ -106,6 +106,11 @@ static void print_object(const unsigned char *sha1, char *path, const char *base htmlf(blob: %s (,

Re: [PATCH] Fix processing of repo.hide and repo.ignore

2015-08-10 Thread John Keeping
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 hack...@nachtgeist.net Reviewed-by: John Keeping j

Re: [PATCH] Fix processing of repo.hide and repo.ignore

2015-08-07 Thread John Keeping
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.

Re: Have scan-path only pull in unlisted repositories

2015-07-24 Thread John Keeping
On Fri, Jul 24, 2015 at 09:35:05AM +1000, Matt Hevern wrote: I'd like to be able to specify a number of existing git repositories, and associated descriptions, sections etc, so that they show up orderly via the web interface - but I'd also like to set up scan-path so that if anyone pushes new

Re: Have scan-path only pull in unlisted repositories

2015-07-24 Thread John Keeping
On Fri, Jul 24, 2015 at 11:42:00PM +1000, Matt Hevern wrote: On Fri, Jul 24, 2015 at 7:21 PM, John Keeping j...@keeping.me.uk wrote: On Fri, Jul 24, 2015 at 09:35:05AM +1000, Matt Hevern wrote: I'd like to be able to specify a number of existing git repositories, and associated

Timezones in CGit

2015-06-26 Thread John Keeping
I've just realised that CGit prints dates either in the server's timezone or in UTC. I'm not sure how I've never spotted it before, but I find it a bit surprising considering that Git's normal behaviour is to show author/committer timestamps in the originator's timezone. I'd like to change

Re: [PATCH] ui-repolist: Tweak max-repo-count handling

2015-06-18 Thread John Keeping
On Thu, Jun 18, 2015 at 02:18:32PM +0200, Bernhard Reutner-Fischer wrote: A max-repo-count less than or equal to 0 now disables repository pagination. Previously a value of 0 or smaller went into an infinite loop just printing pagination links without any repo. Signed-off-by: Bernhard

Re: disable logo-link ?

2015-06-18 Thread John Keeping
On Thu, Jun 18, 2015 at 05:03:35PM +0200, Bernhard Reutner-Fischer wrote: On 18 June 2015 at 16:48, John Keeping j...@keeping.me.uk wrote: On Thu, Jun 18, 2015 at 04:38:32PM +0200, Bernhard Reutner-Fischer wrote: A colleague asked if it's possible to disable the logo-link, but that doesn't

Re: Troubles using special characters in links with lighttpd

2015-05-15 Thread John Keeping
On Fri, May 15, 2015 at 02:08:23PM +0200, David Demelier wrote: I'm trying to setup cgit with lighttpd, this is my actual configuration : $HTTP[host] == git.malikania.fr { alias.url = ( /static/ = /usr/local/www/cgit/, /cgit.cgi =

Re: Troubles using special characters in links with lighttpd

2015-05-15 Thread John Keeping
On Fri, May 15, 2015 at 03:12:53PM +0200, David Demelier wrote: On Fri, 2015-05-15 at 13:39 +0100, John Keeping wrote: On Fri, May 15, 2015 at 01:24:29PM +0100, John Keeping wrote: a href=/code/tree/C%20%20C /a So I think what's happening is that you rewrite the URL from

Re: Troubles using special characters in links with lighttpd

2015-05-15 Thread John Keeping
On Fri, May 15, 2015 at 01:24:29PM +0100, John Keeping wrote: On Fri, May 15, 2015 at 02:08:23PM +0200, David Demelier wrote: I'm trying to setup cgit with lighttpd, this is my actual configuration : $HTTP[host] == git.malikania.fr { alias.url = ( /static

Re: [PATCH] cgit: use strtol_i instead of atoi

2015-05-13 Thread John Keeping
On Wed, May 13, 2015 at 03:35:29PM +0200, Jason A. Donenfeld wrote: Anybody have any objections to this? In some cases it's slightly more verbose, but otherwise, I can't see any downsides. It's worse if there is trailing data. Since there's nothing obvious we can do if the input is bad, I'm

Re: [Idea] A local cgit configuration per project?

2015-04-30 Thread John Keeping
On Thu, Apr 30, 2015 at 02:57:22PM +0200, Vincent Férotin wrote: As a newbie to cgit, I'm currently trying to configure it for a a project which hosts some git repos. It seems to me (please refute me if I'm wrong) that cgit takes its configuration from a given hard-coded path, i.e.

Re: [PATCH 01/17] ui-shared: add cgit_print_error_page() function

2015-04-07 Thread John Keeping
On Tue, Apr 07, 2015 at 03:23:03PM +0200, Jason A. Donenfeld wrote: On Sun, Apr 5, 2015 at 5:54 PM, John Keeping wrote: +void cgit_print_error_page(int code, const char *msg, const char *fmt, ...) +{ + va_list ap; + ctx.page.status = 404; + ctx.page.statusmsg

Re: [PATCH 01/17] ui-shared: add cgit_print_error_page() function

2015-04-07 Thread John Keeping
On Tue, Apr 07, 2015 at 03:36:32PM +0200, Jason A. Donenfeld wrote: I've put them in this branch with a few fixes: http://git.zx2c4.com/cgit/log/?h=jk/http-status-codes Feel free to send diffs I should squash into any of these commits. Thanks. The only other change I have from testing this

[PATCH 01/17] ui-shared: add cgit_print_error_page() function

2015-04-05 Thread John Keeping
This will allow us to generate error responses with the correct HTTP response code without needing all of the layout boilerplate. Signed-off-by: John Keeping j...@keeping.me.uk --- ui-shared.c | 14 ++ ui-shared.h | 2 ++ 2 files changed, 16 insertions(+) diff --git a/ui-shared.c b

[PATCH 04/17] plain: use cgit_print_error_page() instead of html_status()

2015-04-05 Thread John Keeping
This provides a formatted error response rather than a simple HTTP error. Signed-off-by: John Keeping j...@keeping.me.uk --- ui-plain.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ui-plain.c b/ui-plain.c index b787bc3..e08dad9 100644 --- a/ui-plain.c +++ b/ui

[PATCH 00/17] HTTP response code improvements

2015-04-05 Thread John Keeping
] http://lists.zx2c4.com/pipermail/cgit/2015-March/002464.html John Keeping (17): ui-shared: add cgit_print_error_page() function cgit: use cgit_print_error_page() where appropriate clone: use cgit_print_error_page() instead of html_status() plain: use cgit_print_error_page() instead

[PATCH 02/17] cgit: use cgit_print_error_page() where appropriate

2015-04-05 Thread John Keeping
These are more-or-less one-to-one translations but in the final hunk we gain an HTTP error code where we used to send 200 OK, which is an improvement. Signed-off-by: John Keeping j...@keeping.me.uk --- cgit.c | 27 +++ 1 file changed, 7 insertions(+), 20 deletions

[PATCH 03/17] clone: use cgit_print_error_page() instead of html_status()

2015-04-05 Thread John Keeping
This provides a formatted error response rather than a simple HTTP error. Signed-off-by: John Keeping j...@keeping.me.uk --- ui-clone.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ui-clone.c b/ui-clone.c index e35d3d3..e7a6b76 100644 --- a/ui-clone.c +++ b/ui

[PATCH 17/17] cmd: remove want_layout field

2015-04-05 Thread John Keeping
No commands use this any more. Signed-off-by: John Keeping j...@keeping.me.uk --- cgit.c | 9 - cmd.c | 44 ++-- cmd.h | 1 - 3 files changed, 22 insertions(+), 32 deletions(-) diff --git a/cgit.c b/cgit.c index 227c336..465b4c3 100644

[PATCH 16/17] tree: move layout into page function

2015-04-05 Thread John Keeping
This also allows us to return proper HTTP error codes when the requested tree is not found and display an error message in one case (invalid path inside valid commit) where we previously just displayed an empty page. Signed-off-by: John Keeping j...@keeping.me.uk --- cmd.c | 2 +- ui-tree.c

Re: [PATCH 16/17] tree: move layout into page function

2015-04-05 Thread John Keeping
On Sun, Apr 05, 2015 at 04:55:02PM +0100, John Keeping wrote: This also allows us to return proper HTTP error codes when the requested tree is not found and display an error message in one case (invalid path inside valid commit) where we previously just displayed an empty page. Signed-off

[PATCH 14/17] summary: move layout into page function

2015-04-05 Thread John Keeping
Signed-off-by: John Keeping j...@keeping.me.uk --- cmd.c| 2 +- ui-summary.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/cmd.c b/cmd.c index 5340405..ef41ccf 100644 --- a/cmd.c +++ b/cmd.c @@ -159,7 +159,7 @@ struct cgit_cmd *cgit_get_cmd(void

[PATCH 15/17] tag: move layout into page function

2015-04-05 Thread John Keeping
This also allows us to return proper HTTP error codes when something goes wrong. Signed-off-by: John Keeping j...@keeping.me.uk --- cmd.c| 2 +- ui-tag.c | 13 ++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/cmd.c b/cmd.c index ef41ccf..27408f2 100644

[PATCH 10/17] diff: move layout to page function

2015-04-05 Thread John Keeping
The existing show_ctrls flag is used to control whether we are running in an existing page or control the page ourselves. Signed-off-by: John Keeping j...@keeping.me.uk --- cmd.c | 2 +- ui-diff.c | 19 ++- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git

[PATCH 13/17] stats: move layout into page function

2015-04-05 Thread John Keeping
This also allows us to return proper HTTP error codes for invalid requests. Signed-off-by: John Keeping j...@keeping.me.uk --- cmd.c | 2 +- ui-stats.c | 8 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/cmd.c b/cmd.c index 57a8fe7..5340405 100644 --- a/cmd.c +++ b

[PATCH 07/17] ui-shared: add cgit_print_layout_{start,end}()

2015-04-05 Thread John Keeping
These will avoid needing to call three functions to start page layout in subsequent patches when we move the layout setup into each individual page. Signed-off-by: John Keeping j...@keeping.me.uk --- ui-shared.c | 12 ui-shared.h | 3 +++ 2 files changed, 15 insertions(+) diff

[PATCH 12/17] refs: move layout to page function

2015-04-05 Thread John Keeping
Signed-off-by: John Keeping j...@keeping.me.uk --- cmd.c | 2 +- ui-refs.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/cmd.c b/cmd.c index b61c736..57a8fe7 100644 --- a/cmd.c +++ b/cmd.c @@ -155,7 +155,7 @@ struct cgit_cmd *cgit_get_cmd(void

[PATCH 06/17] html: remove html_status()

2015-04-05 Thread John Keeping
This is now unused. Signed-off-by: John Keeping j...@keeping.me.uk --- html.c | 7 --- html.h | 1 - 2 files changed, 8 deletions(-) diff --git a/html.c b/html.c index 155cde5..9e0d6ba 100644 --- a/html.c +++ b/html.c @@ -127,13 +127,6 @@ void html_vtxtf(const char *format, va_list ap

Re: [PATCH 00/17] HTTP response code improvements

2015-04-05 Thread John Keeping
On Sun, Apr 05, 2015 at 04:54:46PM +0100, John Keeping wrote: Following Nicolas' report[0] about CGit caching error pages I've been looking into ways of (optionally) avoiding caching error responses. This series doesn't achieve that but it does give us two features that will help to do so

Re: unexpected cache issue when http errors

2015-03-31 Thread John Keeping
On Mon, Mar 30, 2015 at 07:15:27PM +0200, Nicolas Dely wrote: I would like to share an unexpected cache behaviour with this list and discuss about a solution. Indeed we are using cgit to provide a web interface to our internal user and also to provide file to our reviewboard server. We

Re: [PATCH] ui-commit: display commit notes as 'raw'

2015-03-21 Thread John Keeping
On Sat, Mar 21, 2015 at 02:11:51PM +0100, Stefan Naewe wrote: On Fri, Mar 20, 2015 at 10:29 PM, John Keeping j...@keeping.me.uk wrote: On Fri, Mar 20, 2015 at 05:39:53PM +0100, Stefan Naewe wrote: When the git function format_display_notes() is called with a value != 0 as the last argument

Re: [PATCH] ui-commit: display commit notes as 'raw'

2015-03-20 Thread John Keeping
On Fri, Mar 20, 2015 at 05:39:53PM +0100, Stefan Naewe wrote: When the git function format_display_notes() is called with a value != 0 as the last argument ('raw') the notes text gets displayed w/o an additional 'Notes:' header. This seems to be better suited for our needs since we're already

Re: [PATCH] Check SHA256 sum of git-$VER.tar.gz after downloading

2015-03-09 Thread John Keeping
On Mon, Mar 09, 2015 at 03:39:29PM -0400, Todd Zullinger wrote: Those on the list can check the PGP signature on the announcement mail and then use the included SHA1 to check the tarball, but doing that as a non-list member isn't as easy due to many list archives stripping or mangling PGP

Re: [PATCH] Check SHA256 sum of git-$VER.tar.gz after downloading

2015-03-08 Thread John Keeping
On Sat, Mar 07, 2015 at 06:35:10PM -0500, Todd Zullinger wrote: John Keeping wrote: I still think we can't rely on `gpg --recv-keys` though, we would have to distribute the key with CGit and possible also do something to avoid importing it into the user's keyring by default

[PATCH 02/13] Avoid non-ANSI function declarations

2015-03-08 Thread John Keeping
Sparse says things like: warning: non-ANSI function declaration of function 'calc_ttl' Signed-off-by: John Keeping j...@keeping.me.uk --- cgit.c| 2 +- filter.c | 2 +- ui-diff.c | 2 +- ui-refs.c | 4 ++-- ui-repolist.c | 6 +++--- ui-shared.c | 12

[PATCH 00/13] Fixes for problems detected by Sparse

2015-03-08 Thread John Keeping
://sparse.wiki.kernel.org/index.php/Main_Page John Keeping (13): Makefile: add a target to run CGit through sparse Avoid non-ANSI function declarations Avoid signed bitfields scan-tree: make some variables 'static' shared: make some variables 'static' ui-log: make some variables 'static' ui-repolist

[PATCH 01/13] Makefile: add a target to run CGit through sparse

2015-03-08 Thread John Keeping
Signed-off-by: John Keeping j...@keeping.me.uk --- Makefile | 3 +++ cgit.mk | 9 - 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index ed329e8..42ed230 100644 --- a/Makefile +++ b/Makefile @@ -68,6 +68,9 @@ all:: cgit cgit: $(QUIET_SUBDIR0

[PATCH 13/13] html: avoid using a plain integer as a NULL pointer

2015-03-08 Thread John Keeping
Sparse complains about this table because we use the integer zero as the NULL pointer. Use this as an opportunity to reformat the table so that it always contains 8 elements per row, making it easier to see which values are being set and which are not. Signed-off-by: John Keeping j

[PATCH 08/13] ui-shared: make cgit_doctype 'static'

2015-03-08 Thread John Keeping
This is not used outside this file and is not declared. Signed-off-by: John Keeping j...@keeping.me.uk --- ui-shared.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui-shared.c b/ui-shared.c index 6d3cfa9..d4c4bb9 100644 --- a/ui-shared.c +++ b/ui-shared.c @@ -11,7 +11,7

[PATCH 09/13] ui-stats: make cgit_period definitions 'static const'

2015-03-08 Thread John Keeping
These definitions should not be modified (and never are) so we can move them to .rodata. Signed-off-by: John Keeping j...@keeping.me.uk --- ui-stats.c | 14 +++--- ui-stats.h | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/ui-stats.c b/ui-stats.c index a264f6a

[PATCH 10/13] ui-shared: avoid initializing static variable to zero

2015-03-08 Thread John Keeping
Sparse complains that we are using a plain integer as a NULL pointer here, but in fact we do not have to specify a value for this variable at all since it has static storage duration and thus will be initialized to NULL by the compiler. Signed-off-by: John Keeping j...@keeping.me.uk --- ui

[PATCH 12/13] cache: don't use an integer as a NULL pointer

2015-03-08 Thread John Keeping
Signed-off-by: John Keeping j...@keeping.me.uk --- cache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cache.c b/cache.c index 900b161..cd99812 100644 --- a/cache.c +++ b/cache.c @@ -411,7 +411,7 @@ int cache_ls(const char *path) DIR *dir; struct dirent

[PATCH 07/13] ui-repolist: make sortcolumn definitions 'static const'

2015-03-08 Thread John Keeping
These are not used outside this file and are not declared; they are also never modified. Signed-off-by: John Keeping j...@keeping.me.uk --- ui-repolist.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ui-repolist.c b/ui-repolist.c index a6d0321..2453a7f 100644 --- a/ui

[PATCH 03/13] Avoid signed bitfields

2015-03-08 Thread John Keeping
Bitfields are only defined for unsigned types. Detected by sparse. Signed-off-by: John Keeping j...@keeping.me.uk --- ui-blob.c | 4 ++-- ui-diff.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ui-blob.c b/ui-blob.c index a025bca..388a017 100644 --- a/ui-blob.c +++ b/ui

[PATCH 05/13] shared: make some variables 'static'

2015-03-08 Thread John Keeping
These are not used outside this file and are not declared. Signed-off-by: John Keeping j...@keeping.me.uk --- shared.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/shared.c b/shared.c index ae17d78..a99173b 100644 --- a/shared.c +++ b/shared.c @@ -284,8 +284,8

[PATCH 04/13] scan-tree: make some variables 'static'

2015-03-08 Thread John Keeping
These are not used outside this file and are not declared. Signed-off-by: John Keeping j...@keeping.me.uk --- scan-tree.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scan-tree.c b/scan-tree.c index e900ad9..8e3cf52 100644 --- a/scan-tree.c +++ b/scan-tree.c @@ -45,8

Re: [PATCH] Check SHA256 sum of git-$VER.tar.gz after downloading

2015-03-07 Thread John Keeping
On Sat, Mar 07, 2015 at 06:49:32PM +0100, Lukas Fleischer wrote: On Sat, 07 Mar 2015 at 18:02:59, John Keeping wrote: [...] I'm not sure what benefit it has if it's optional. Will anyone check? Maybe we could do something like: if type sha256sum /dev/null 21

[PATCH] Check SHA256 sum of git-$VER.tar.gz after downloading

2015-03-07 Thread John Keeping
the file when updating our Git version in the future. Signed-off-by: John Keeping j...@keeping.me.uk --- Makefile | 8 ++-- git.sha256sum| 1 + tests/t0001-validate-git-versions.sh | 11 +++ 3 files changed, 18 insertions(+), 2

Re: [PATCH] Support .git/category files

2015-03-05 Thread John Keeping
On Thu, Mar 05, 2015 at 06:50:47PM +0100, Jan-Marek Glogowski wrote: Am 05.03.2015 um 18:38 schrieb John Keeping: What's the advantage of this over using enable-git-config=1 and cgit.section (we even support gitweb.section as an alias)? Well - I have 100+ repositories, which already have

Re: Support for submodules in tree view?

2015-03-05 Thread John Keeping
On Thu, Mar 05, 2015 at 06:19:31PM +, Dunnigan, Terrence J wrote: We are using cgit 0.10.1. Some of our repos have submodules, and when I look at a tree view I see the name of the submodule with its current hash, e.g. m- Utilities @ 350bc94 The submodule names are all

Re: Support for submodules in tree view?

2015-03-05 Thread John Keeping
On Thu, Mar 05, 2015 at 07:31:01PM +0100, Lukas Fleischer wrote: On Thu, 05 Mar 2015 at 19:25:53, John Keeping wrote: On Thu, Mar 05, 2015 at 06:19:31PM +, Dunnigan, Terrence J wrote: We are using cgit 0.10.1. Some of our repos have submodules, and when I look at a tree view I see

Re: Description for section and link for repos

2015-03-05 Thread John Keeping
On Thu, Mar 05, 2015 at 10:51:09AM +0100, Pablo Rauzy wrote: Hello again, and thanks for your quick response. On 2015-03-05, John Keeping wrote: On Thu, Mar 05, 2015 at 09:22:55AM +0100, Pablo Rauzy wrote: My first question is about sections. I would like to be able to add a title

Re: [PATCH] Simplify commit and tag parsing

2015-03-05 Thread John Keeping
On Thu, Mar 05, 2015 at 11:46:55AM +0100, Jason A. Donenfeld wrote: This commit breaks ui-tag. The first few lines of tag messages are cut off. It looks like parse_user() consumes the trailing LF on the user line, so next_header_line() ends up skipping the blank line at the end of the header. I

Re: Description for section and link for repos

2015-03-05 Thread John Keeping
On Thu, Mar 05, 2015 at 09:22:55AM +0100, Pablo Rauzy wrote: My first question is about sections. I would like to be able to add a title and a little description for each section, just like I can with the cgit.desc configuration for each the git repos. Example : http://clandest.in/sensi

Re: cache issue

2015-03-03 Thread John Keeping
On Sun, Mar 01, 2015 at 07:36:00PM +, John Keeping wrote: On Sun, Mar 01, 2015 at 06:43:17PM +, Bertrand Jacquin wrote: On 28/02/2015 12:37, John Keeping wrote: On Sat, Feb 28, 2015 at 12:06:41PM +, Bertrand Jacquin wrote: We are still experiencing the issue. Is there any

Re: cache issue

2015-03-01 Thread John Keeping
On Sun, Mar 01, 2015 at 06:43:17PM +, Bertrand Jacquin wrote: On 28/02/2015 12:37, John Keeping wrote: On Sat, Feb 28, 2015 at 12:06:41PM +, Bertrand Jacquin wrote: We are still experiencing the issue. Is there any fixes with newer releases ? I have just tried to reproduce

Re: cache issue

2015-02-28 Thread John Keeping
On Sat, Feb 28, 2015 at 12:06:41PM +, Bertrand Jacquin wrote: We are still experiencing the issue. Is there any fixes with newer releases ? I have just tried to reproduce this with the latest version and have not been able to do so, but I'm not aware of any changes that should have an

Re: Git blame support

2015-01-21 Thread John Keeping
On Wed, Jan 21, 2015 at 11:02:32AM -0500, Elijah Lynn wrote: I am not sure if there is an issue tracker being used for the project. I asked the list a while back but haven't heard back. At any rate, is there a way I can see if there is git blame support being built? I am part of the Drupal

Re: [PATCH v2 1/1] git: preview for v2.3.0-rc0

2015-01-15 Thread John Keeping
On Wed, Jan 14, 2015 at 04:34:20PM +0100, l...@eworm.de wrote: From: Christian Hesse m...@eworm.de * sort_string_list(): rename to string_list_sort() (upstream commit * 3383e199) * update read_tree_recursive callback to pass strbuf as base (upstream commit 6a0b0b6d) Signed-off-by:

Re: [PATCH 1/1] git: preview for v2.3.0-rc0

2015-01-13 Thread John Keeping
On Tue, Jan 13, 2015 at 09:56:47AM +0100, l...@eworm.de wrote: From: Christian Hesse m...@eworm.de * sort_string_list(): rename to string_list_sort() (upstream commit 3383e199) * update read_tree_recursive callback to pass strbuf as base (upstream commit 6a0b0b6d) Signed-off-by:

Re: [PATCH 1/1] git: preview for v2.3.0-rc0

2015-01-13 Thread John Keeping
On Tue, Jan 13, 2015 at 10:57:39AM +0100, Christian Hesse wrote: John Keeping j...@keeping.me.uk on Tue, 2015/01/13 09:43: On Tue, Jan 13, 2015 at 09:56:47AM +0100, l...@eworm.de wrote: From: Christian Hesse m...@eworm.de * sort_string_list(): rename to string_list_sort() (upstream

[PATCH] ui-diff: don't link to single file diff stat

2014-12-29 Thread John Keeping
Seeing the diff stat for a single file is pretty useless, so reset the diff type before generating the links to individual files in the diff stat so that the links will show a useful diff. Reported-by: Konstantin Ryabitsev mri...@kernel.org Signed-off-by: John Keeping j...@keeping.me.uk

[PATCH 1/2] t0108: modernize style

2014-12-28 Thread John Keeping
* -chaining * use test_cmp instead of cmp * use strip_headers instead of knowing how many lines there will be Signed-off-by: John Keeping j...@keeping.me.uk --- tests/t0108-patch.sh | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/tests/t0108-patch.sh b

[PATCH 2/2] ui-patch: match git-format-patch(1) output

2014-12-28 Thread John Keeping
ourselves. DIFF_FORMAT_SUMMARY is added so that we match the output of git-format-patch(1) without the -p option. Signed-off-by: John Keeping j...@keeping.me.uk --- tests/t0108-patch.sh | 4 ++-- ui-patch.c | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/t0108

Re: [PATCH] contrib/hooks: add sample post-receive hook using agefile

2014-12-23 Thread John Keeping
On Tue, Dec 23, 2014 at 04:15:15PM +0100, Ferry Huberts wrote: On 23/12/14 15:40, John Keeping wrote: +agefile=$(git rev-parse --git-dir)/info/web/last-modified use $GIT_DIR here instead of rev-parse githooks(5) doesn't guarantee that GIT_DIR will be set and the fact that it currently

Re: [PATCH 1/1] git: update to v2.2.0

2014-11-27 Thread John Keeping
On Thu, Nov 27, 2014 at 01:30:56AM +0100, Christian Hesse wrote: Update to git version v2.2.0, including API changes. --- [...] diff --git a/ui-repolist.c b/ui-repolist.c index c2bcce1..0e57c53 100644 --- a/ui-repolist.c +++ b/ui-repolist.c @@ -17,16 +17,18 @@ static time_t

[PATCH 0/4] Add stat only diff mode

2014-10-05 Thread John Keeping
value in the final patch. John Keeping (4): ui-shared: remove toggle_ssdiff arg to cgit_commit_link() ui-shared: remove toggle_ssdiff arg to cgit_diff_link() Change ss diff flag to an enum ui-diff: add stat only diff type cgit.c | 12 cgit.h | 10 +++--- ui

[PATCH 1/4] ui-shared: remove toggle_ssdiff arg to cgit_commit_link()

2014-10-05 Thread John Keeping
This argument is never used with a value other than zero, so remove it and simplify the code. Signed-off-by: John Keeping j...@keeping.me.uk --- ui-commit.c | 4 ++-- ui-log.c| 4 ++-- ui-refs.c | 2 +- ui-shared.c | 11 +-- ui-shared.h | 3 +-- 5 files changed, 11 insertions

[PATCH 2/4] ui-shared: remove toggle_ssdiff arg to cgit_diff_link()

2014-10-05 Thread John Keeping
This argument is never used with a value other than zero, so remove it and simplify the code. Signed-off-by: John Keeping j...@keeping.me.uk --- ui-commit.c | 2 +- ui-diff.c | 4 ++-- ui-shared.c | 8 ui-shared.h | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git

[PATCH 3/4] Change ss diff flag to an enum

2014-10-05 Thread John Keeping
. Signed-off-by: John Keeping j...@keeping.me.uk --- cgit.c | 12 cgit.h | 10 +++--- ui-diff.c | 8 +--- ui-shared.c | 8 4 files changed, 24 insertions(+), 14 deletions(-) diff --git a/cgit.c b/cgit.c index 8c4517d..db60107 100644 --- a/cgit.c +++ b

[PATCH 4/4] ui-diff: add stat only diff type

2014-10-05 Thread John Keeping
This prints the diffstat but stops before printing (or generating) any of the body of the diff. No cgitrc option is added here so that we can wait to see how useful this is before letting people set it as the default. Suggested-by: Konstantin Ryabitsev mri...@kernel.org Signed-off-by: John

Re: Fwd: JSON interface

2014-10-05 Thread John Keeping
On Sun, Oct 05, 2014 at 02:13:35PM +0300, Wilhelm Matilainen wrote: Instead of acting as a server providing html and css files, could there be a only-json option? You can already configure the URL for CGit's CSS and logo files to point at a separate machine if you want to do that. I could

Bash vulnerability (CVE-2014-6271)

2014-09-24 Thread John Keeping
In case anyone hasn't seen it yet, today's Bash vulnerability (CVE-2014-6271) [0] may affect CGit servers. I don't believe CGit in its default configuration will cause a shell to be executed, but if you configure a filter then you may well be causing a shell to be executed with the environment of

Re: regular expression in search

2014-08-25 Thread John Keeping
On Sat, Aug 23, 2014 at 03:49:52PM +0200, William Bell wrote: I would like to use a regular expression in the search field as in gitweb. What do you mean by this? The log msg, author and committer searches already take regular expressions. Do you mean a pickaxe search option?

Re: [PATCH] Handle If-None-Match HTTP header in plain view

2014-08-13 Thread John Keeping
On Tue, Aug 12, 2014 at 06:53:01PM -0300, Damián Nohales wrote: 2014-08-12 16:15 GMT-03:00 John Keeping j...@keeping.me.uk: If we have sufficient infrastructure to handle HEAD requests then it should be trivial to add proper Etag handling on top, but I don't think it's trivial to add

Re: Compile cGit 2.0.4

2014-08-11 Thread John Keeping
On Mon, Aug 11, 2014 at 08:40:53PM +0100, Jorge Bastos wrote: Trying to compile cgit last git head cgit (2.0.4) to see if one charset problem is solved, but got this: Peixe:/usr/local/src/cgit/cgit# make SUBDIR git ./gen-version.sh: line 2: $'\r': command not found ./gen-version.sh:

[PATCH] git: update to v2.0.4

2014-08-03 Thread John Keeping
No CGit changes required. Signed-off-by: John Keeping j...@keeping.me.uk --- Makefile | 2 +- git | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 93b525a..6a8a125 100644 --- a/Makefile +++ b/Makefile @@ -14,7 +14,7 @@ htmldir = $(docdir

Re: [PATCH] filter: add support for owner-filter

2014-08-01 Thread John Keeping
On Fri, Aug 01, 2014 at 04:01:53PM -0400, Chris Burroughs wrote: revised patch This type of comment should go below the --- line below, since it's not intended to be part of the commit message in the permanent history. Also filter in the subject doesn't really identify a code area. How about

[PATCH 1/3] Extract clone URL printing to ui-shared.c

2014-08-01 Thread John Keeping
This will allow us to reuse the same logic to add clone URL link/ elements to the header of all repo-specific pages in order to support the rel-vcs microformat. Signed-off-by: John Keeping j...@keeping.me.uk --- ui-shared.c | 37 + ui-shared.h | 2 ++ ui

Re: source-filter isn't getting applied

2014-07-28 Thread John Keeping
On Mon, Jul 28, 2014 at 05:14:43PM -0400, Nik Nyby wrote: I have cgit installed and the source-filter isn't working on any of my source files. I have Python and Pygments installed. I tried manually running the script on some files, and it's giving back html correctly. Here's my /etc/cgitrc:

<    1   2   3   4   5   >