[PATCH] git: update to 1.8.4

2013-08-23 Thread John Keeping
No code changes required, just bump the submodule and makefile versions. 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 49b6b0c..82d5b58 100644 --- a/Makefile +++ b

Re: HEAD tag when branch viewed

2013-09-16 Thread John Keeping
On Mon, Sep 16, 2013 at 06:35:43PM +, Smith, Eric wrote: Is this the right place to ask a cgit question? Yes :-) Shouldn't the red HEAD indicator reflect the selected branch? Using cgit v0.9.2 the Summary display of the 'master' branch correctly displays the red HEAD indicator next to

Re: Encoding problem

2013-10-06 Thread 'John Keeping'
On Sat, Oct 05, 2013 at 11:32:54AM +0100, Jorge Bastos wrote: On Sat, Sep 28, 2013 at 12:19:38AM +0100, Jorge Bastos wrote: Is it possible to define charset in cgitrc? I'm having encoding problems in the frontend, in the latest version 1.8.4 from version 0.9.2, and now non-ascii

Re: Help with installing cgit

2013-12-29 Thread John Keeping
On Sun, Dec 29, 2013 at 08:46:37AM +, Shlomit Afgin wrote: I download from http://git.zx2c4.com/cgit/refs/ the file cgit-0.9.2.tar.xz I follow the instruction in README: make get-git make make install Edit Apache conf file and add Directory

Re: [PATCH 2/2] README: Update dependencies

2014-01-09 Thread John Keeping
On Thu, Jan 09, 2014 at 04:13:08PM +0100, Jason A. Donenfeld wrote: On Thu, Jan 9, 2014 at 8:30 AM, Lukas Fleischer c...@cryptocrack.de wrote: We depend on Git in the test suite. Maybe this should be changed to use the binary from the Git submodule instead? I think we discussed the

Re: RFE: author/committer/tagger links (enable cgit to show gravatar for author, committer and tagger)

2014-01-09 Thread John Keeping
On Thu, Jan 09, 2014 at 06:50:29PM +0100, Jason A. Donenfeld wrote: On Thu, Jan 9, 2014 at 4:21 PM, Konstantin Ryabitsev mri...@kernel.org wrote: That's pretty nifty. Cool. Would you consider enabling this on kernel.org? I'll probably merge it in a few days (still working out some bugs).

Re: RFE: .so filters

2014-01-09 Thread John Keeping
On Thu, Jan 09, 2014 at 10:34:26PM +0100, Jason A. Donenfeld wrote: I'm thinking about this filtering situation w.r.t. gravatar and potentially running multiple filters on one page. Something I've been considering is implementing a simple dlopen() mechanism for filters, if the filter filename

Re: [PATCH] Disallow downloading disabled snapshot formats

2014-01-10 Thread John Keeping
On Fri, Jan 10, 2014 at 03:38:06PM +0100, Lukas Fleischer wrote: We did only display enabled snapshot formats but we did not prevent from downloading disabled formats when requested. Fix this by adding an appropriate check. Also, add a test case that checks whether downloading disabled

Re: RFE: .so filters

2014-01-10 Thread John Keeping
On Fri, Jan 10, 2014 at 06:12:25PM +0100, Florian Pritz wrote: On 10.01.2014 16:57, Jason A. Donenfeld wrote: On Fri, Jan 10, 2014 at 10:06 AM, John Keeping j...@keeping.me.uk wrote: This seems drastically over complicated. So here's the situation. There's a lot of state that we're

Re: RFE: .so filters

2014-01-10 Thread John Keeping
On Fri, Jan 10, 2014 at 09:03:24PM +0100, Florian Pritz wrote: On 10.01.2014 18:57, Jason A. Donenfeld wrote: On Fri, Jan 10, 2014 at 6:12 PM, Florian Pritz bluew...@xinu.at wrote: Isn't this (fast scripting with lots of features) when people normally start using lua? This would

[PATCH 5/6] filter: add interface layer

2014-01-12 Thread John Keeping
an init function to set up the function pointers. This is required so that the ui-snapshot.c code that applies a compression filter can continue to use the filter interface to do so. Signed-off-by: John Keeping j...@keeping.me.uk --- cgit.h| 8 filter.c | 66

[RFC/PATCH 0/6] Preparation for more filter types

2014-01-12 Thread John Keeping
any further. John Keeping (6): html: remove redundant htmlfd variable ui-snapshot: set unused cgit_filter fields to zero filter: pass extra arguments via cgit_open_filter filter: add fprintf_filter function filter: add interface layer filter: introduce filter type prefix cgit.c

[PATCH 2/6] ui-snapshot: set unused cgit_filter fields to zero

2014-01-12 Thread John Keeping
By switching the assignment of fields in the cgit_filter structure to use designated initializers, the compiler will initialize all other fields to their default value. This will be needed when we add the extra_args field in the next patch. Signed-off-by: John Keeping j...@keeping.me.uk --- ui

Re: [PATCH 4/6] filter: add fprintf_filter function

2014-01-12 Thread John Keeping
On Sun, Jan 12, 2014 at 08:23:02PM +0100, Jason A. Donenfeld wrote: What's the purpose of this? Why not just keep the original string that was passed to about-filter=... in the cmd variable as we have now? The thing that's variable from filter to filter is argv, the type (commit, about, etc),

[PATCH 1/3] ui-refs: escape HTML chars in author and tagger names

2014-01-12 Thread John Keeping
Everywhere else we use html_txt to escape any special characters in these variables. Do so here as well. Signed-off-by: John Keeping j...@keeping.me.uk --- I spotted this while looking at Jason's jd/gravatar series. The following two patches cover other similar issues I spotted while auditing

[PATCH 3/3] ui-repolist: HTML-escape cgit_rooturl() response

2014-01-12 Thread John Keeping
This is for consistency with other callers. The value returned from cgit_rooturl is not guaranteed to be HTML-safe. Signed-off-by: John Keeping j...@keeping.me.uk --- ui-repolist.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ui-repolist.c b/ui-repolist.c index d4ee279

[PATCH 2/3] ui-shared: URL-escape script_name

2014-01-12 Thread John Keeping
As far as I know, there is no requirement that $SCRIPT_NAME contain only URL-safe characters, so we need to make sure that any special characters are escaped. Signed-off-by: John Keeping j...@keeping.me.uk --- ui-shared.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ui

[PATCH] tests: add CGIT_TEST_OPTS variable to Makefile

2014-01-12 Thread John Keeping
This allows running the entire test suite with a set of command-line options. For example: make test CGIT_TEST_OPTS=--valgrind Signed-off-by: John Keeping j...@keeping.me.uk --- tests/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Makefile b/tests

Re: [PATCH 06/12] filter: add preliminary lua support

2014-01-13 Thread John Keeping
On Mon, Jan 13, 2014 at 09:31:39AM +0100, Lukas Fleischer wrote: This patch is quite messy and hard to read. I read your cover-letter but maybe you still want to clean this up when dealing with the other suggestions during a rebase -- shouldn't be too hard when using an editor with good Git

Re: [PATCH 06/12] filter: add preliminary lua support

2014-01-13 Thread John Keeping
On Mon, Jan 13, 2014 at 05:11:13AM +0100, Jason A. Donenfeld wrote: [snip] +static int html_lua_filter(lua_State *lua_state) +{ + size_t len; + const char *str; + + str = lua_tostring(lua_state, 1); + if (!str) + return 0; + len = strlen(str); +

Re: lua vs luajit vs both

2014-01-14 Thread John Keeping
On Tue, Jan 14, 2014 at 02:02:40AM +0100, Jason A. Donenfeld wrote: I've gone ahead and merged the lua work to master, for testing and subsequent cleanup before release. Regarding to jit or not to jit, I currently have this fancy autodetection logic:

Re: Idle time in project overview

2014-01-14 Thread John Keeping
On Tue, Jan 14, 2014 at 11:50:23AM +0100, Stefan Tatschner wrote: I don't know if it is a bug or a feature but I think on this nice mailing list I could ask without being shot or mutilated. :) If I have a git repository with multiple branches and I push to another branch as 'master' the idle

Re: [PATCH] filter: refactor cgit_new_filter()

2014-01-14 Thread John Keeping
On Tue, Jan 14, 2014 at 02:00:48PM +0100, Jason A. Donenfeld wrote: From: Lukas Fleischer c...@cryptocrack.de Use prefixcmp() as a preparation for using strip_prefix() later. Also, interpret the command as a file name if it contains a colon but none of the filter prefixes matches instead of

Re: [PATCH] filter: refactor cgit_new_filter()

2014-01-14 Thread John Keeping
On Tue, Jan 14, 2014 at 09:54:21PM +0100, Jason A. Donenfeld wrote: On Tue, Jan 14, 2014 at 9:39 PM, John Keeping j...@keeping.me.uk wrote: I like the simplification, but I'm not sure the result is better. Even without the rest we should replace the strncmp with prefixcmp though. Agreed

Re: lua vs luajit vs both

2014-01-14 Thread John Keeping
On Tue, Jan 14, 2014 at 07:06:34PM +0100, Jason A. Donenfeld wrote: On Tue, Jan 14, 2014 at 10:08 AM, John Keeping j...@keeping.me.uk wrote: It was more of a there doesn't seem much overhead to supporting both, since the API is the same. I think the Makefile should take an approach

Re: Policy on global variables

2014-01-16 Thread John Keeping
On Thu, Jan 16, 2014 at 12:31:15PM +0100, Jason A. Donenfeld wrote: On Thu, Jan 16, 2014 at 11:47 AM, Eric Wong normalper...@yhbt.net wrote: Lars Hjemli hje...@gmail.com wrote: Supporting something like FCGI in cgit will require a fork(2) for each request, before invoking libgit.a

Re: Policy on global variables

2014-01-16 Thread John Keeping
On Thu, Jan 16, 2014 at 07:38:02PM +0100, Jason A. Donenfeld wrote: On Thu, Jan 16, 2014 at 2:08 PM, John Keeping j...@keeping.me.uk wrote: I had a look at porting to libgit2 about a year ago and it mostly isn't too bad. IIRC the only problematic area is the graph output which we

Re: Policy on global variables

2014-01-16 Thread John Keeping
On Thu, Jan 16, 2014 at 10:26:08PM +0100, Jason A. Donenfeld wrote: On Thu, Jan 16, 2014 at 10:21 PM, John Keeping j...@keeping.me.uk wrote: The first step in this direction may actually be useful even if we stick with embedding libgit.a. So what do you think ought to be done

Re: Policy on global variables

2014-01-16 Thread John Keeping
On Thu, Jan 16, 2014 at 10:36:34PM +0100, Jason A. Donenfeld wrote: On Thu, Jan 16, 2014 at 10:34 PM, John Keeping j...@keeping.me.uk wrote: I'm not sure it makes much difference either way. Even if we use libgit2, providing we're not processing more than one request at once we can still

Re: The road to v0.10.1 or v0.11

2014-01-17 Thread John Keeping
On Fri, Jan 17, 2014 at 05:12:26PM +0100, Jason A. Donenfeld wrote: Here's what I'm thinking about for the next release (or releases?): + FastCGI support I really can't see this being sensible without moving to libgit2. As long as we stick with libgit.a then we need to fork for each request

Re: The road to v0.10.1 or v0.11

2014-01-17 Thread John Keeping
On Fri, Jan 17, 2014 at 06:09:15PM +0100, Jason A. Donenfeld wrote: On Fri, Jan 17, 2014 at 5:38 PM, Jason A. Donenfeld ja...@zx2c4.com wrote: On Fri, Jan 17, 2014 at 5:28 PM, John Keeping j...@keeping.me.uk wrote: I really can't see this being sensible without moving to libgit2. As long

Re: The road to v0.10.1 or v0.11

2014-01-17 Thread John Keeping
On Fri, Jan 17, 2014 at 02:29:19PM -0500, Konstantin Ryabitsev wrote: On 17/01/14 01:22 PM, Jason A. Donenfeld wrote: But scan for repos is caught by the cache most of the time, and presumably even if we run persistently we still need to do that periodically (or use inotify); or do we

Re: Error when searching for a bogus range

2014-06-10 Thread John Keeping
On Tue, Jun 10, 2014 at 02:05:14PM -0400, Konstantin Ryabitsev wrote: cgit-0.10.1-1.el6 (EPEL version) If you search for a bogus range string here: http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/log/ Using something like range and qwerty123456, it returns an Internal

[PATCH] ui-patch: Flush stdout after outputting data

2014-06-11 Thread John Keeping
ends up being truncated. Make sure the buffers are flushed when we finish outputting a patch so that we avoid this. No other UIs use printf(3) so we do not need to worry about them. Signed-off-by: John Keeping j...@keeping.me.uk --- ui-patch.c | 2 ++ 1 file changed, 2 insertions(+) diff --git

Re: [PATCH] ui-patch: Flush stdout after outputting data

2014-06-11 Thread John Keeping
On Wed, Jun 11, 2014 at 04:28:26PM -0400, Konstantin Ryabitsev wrote: On 11/06/14 04:01 PM, John Keeping wrote: Since the html functions use raw write(2) to STDIO_FILENO, we don't notice problems with most pages, but raw patches write using printf(3). This is fine if we're outputting

Re: [PATCH 3/8] Skip forbidden characters.

2014-07-01 Thread John Keeping
On Tue, Jul 01, 2014 at 09:40:28AM +0200, zwin...@kit.edu wrote: From: Sebastian Buchwald sebastian.buchw...@kit.edu Why do we want to do this? Does it not break anything that uses whitespace=pre (explicitly or implicitly)? --- html.c | 9 ++--- 1 file changed, 6 insertions(+), 3

Re: certificate problem with libravatar

2014-07-03 Thread John Keeping
On Thu, Jul 03, 2014 at 11:16:21AM +0200, Christian Hesse wrote: looks like we have a certificate problem with libravatar email filter. For base URL we use //cdn.libravatar.org/, with is fine if cgit serves unencrypted html pages. The url evaluates to http://cdn.libravatar.org/; then. However

Re: owner filter?

2014-07-17 Thread John Keeping
On Thu, Jul 17, 2014 at 10:10:38AM -0400, Chris Burroughs wrote: We would like to decorate the owner field (make a link to a wiki for internal teams, maybe an icon). I've read the FILTER API and other parts of cgitrc and as far as I can tell it's not an existing filter option. Is that

[PATCH 3/3] ui-stats.c: set parent pointer to NULL after freeing it

2014-07-27 Thread John Keeping
We do this everywhere else, so we should be doing it here as well. Signed-off-by: John Keeping j...@keeping.me.uk --- ui-stats.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ui-stats.c b/ui-stats.c index 6f13c32..a264f6a 100644 --- a/ui-stats.c +++ b/ui-stats.c @@ -246,6 +246,7 @@ static

[PATCH 2/3] git: update to v2.0.3

2014-07-27 Thread John Keeping
-off-by: John Keeping j...@keeping.me.uk --- Makefile | 2 +- git| 2 +- parsing.c | 3 ++- ui-atom.c | 3 +-- ui-log.c | 6 ++ ui-stats.c | 2 +- 6 files changed, 8 insertions(+), 10 deletions(-) diff --git a/Makefile b/Makefile index bf8be02..93b525a 100644 --- a/Makefile +++ b

[PATCH 0/3] Update to Git 2.0.3

2014-07-27 Thread John Keeping
-to-const where the buffer field was previously just a char *. The middle commit is the real change and the final one is just an unrelated fix I noticed while in the area. John Keeping (3): parsing.c: make commit buffer const git: update to v2.0.3 ui-stats.c: set parent pointer to NULL after

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:

Re: Fwd: source-filter isn't getting applied

2014-07-29 Thread John Keeping
On Mon, Jul 28, 2014 at 11:59:10PM -0400, Nik Nyby wrote: The permissions on the script files are set to be executable by everyone: -rwxr-xr-x Thanks for the strace idea. I'm looking through the strace, but I haven't seen any helpful mention of the filter scripts yet. I've attached an

Re: commit-filter not being applied on log page

2014-08-01 Thread John Keeping
On Thu, Jul 31, 2014 at 10:27:19AM -0400, Chris Burroughs wrote: I'm trying to write a commit-filter to hyperlink references to our bug tracker. It seems to work fine for commit detailed pages, but not at all for the log view. Since our developers often make brief messages like fixes

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 2/3] ui-summary: add rel='vcs-git' to clone URL links

2014-08-01 Thread John Keeping
This is described in the rel-vcs microformat[1]. [1] https://joeyh.name/rfc/rel-vcs/ Signed-off-by: John Keeping j...@keeping.me.uk --- ui-summary.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ui-summary.c b/ui-summary.c index 70ea908..46ca713 100644 --- a/ui

[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

[PATCH 3/3] ui-shared: add rel-vcs microformat links to HTML header

2014-08-01 Thread John Keeping
As described at https://joeyh.name/rfc/rel-vcs/. Signed-off-by: John Keeping j...@keeping.me.uk --- ui-shared.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/ui-shared.c b/ui-shared.c index 5bae02d..9ac65ab 100644 --- a/ui-shared.c +++ b/ui-shared.c @@ -661,6 +661,15 @@ void

[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: 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:

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

2014-08-11 Thread John Keeping
On Mon, Aug 11, 2014 at 05:53:23PM -0300, Damián Nohales wrote: We are sending Etag to clients but this header is basically unusefulness if the server doesn't tell the client if the content has been changed or not for a given Path/Etag pair. Signed-off-by: Damián Nohales

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: 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?

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

[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

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

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

[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

[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

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:

[PATCH] tag: reference with h instead of id

2015-01-15 Thread John Keeping
of the tag. This is clearly desirable when the tag has been reached from the refs UI and changing the behaviour for tag decorations makes them match branch decorations where log - decoration - log shows the log of the decoration. Reported-by: Ferry Huberts maili...@hupie.com Signed-off-by: John

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

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-07 Thread John Keeping
On Sat, Mar 07, 2015 at 04:59:26PM +0100, Lukas Fleischer wrote: On Sat, 07 Mar 2015 at 15:46:41, John Keeping wrote: This requires that we save the downloaded file explicitly rather than piping it straight to tar, but that is advisable anyway since it allows us to check the exit status

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] 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

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: 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: cache issue

2015-03-03 Thread John Keeping
From eb741581ec16d3249e7d207c3dbc4a433a8f329b Mon Sep 17 00:00:00 2001 Message-Id: eb741581ec16d3249e7d207c3dbc4a433a8f329b.1425410489.git.j...@keeping.me.uk From: John Keeping j...@keeping.me.uk Date: Tue, 3 Mar 2015 19:01:24 + Subject: [PATCH] cache: use F_SETLK to avoid stale lock files

Re: [PATCH] Support .git/category files

2015-03-05 Thread John Keeping
On Thu, Mar 05, 2015 at 06:15:04PM +0100, Jan-Marek Glogowski wrote: Gitweb reads .git/category to set a repository section for grouping. This handles the file in the same way a .git/description file is handled. The file section takes precedence over the ctx.cfg.section_from_path setting.

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: cache issue

2015-03-03 Thread John Keeping
On Tue, Mar 03, 2015 at 11:56:11PM +0100, Jason A. Donenfeld wrote: Thanks! Merged. It would be nice to see a test case built out of the example you gave in the commit message. It has to run for a couple of minutes to get sensible results. I guess we could introduce an EXPENSIVE prerequisite

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: 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

[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

  1   2   3   4   5   >