Re: [PATCH 0/3] Fix some issues found by Coverity

2016-01-17 Thread John Keeping
On Sun, Jan 17, 2016 at 05:19:04PM +0100, Jason A. Donenfeld wrote: > So there is now only 1 issue remaining: 13839. > > static void add_commit(struct string_list *authors, struct commit *commit, > const struct cgit_period *period) > { > struct commitinfo *info; > struct

Re: XSS in cgit

2016-01-16 Thread John Keeping
On Sat, Jan 16, 2016 at 01:23:39AM +0100, Jason A. Donenfeld wrote: > Thanks for your response. So the use case was in fact quite specific, > and it seems like our recent treatment of the /plain endpoint handles > that quite well and in a safe manner too. > > Okay, I feel solid about the change

Re: cgit sort branches

2016-01-17 Thread John Keeping
On Sat, Jan 16, 2016 at 07:56:25PM -0800, Radha Mohan wrote: > I set up cgit for my git server and am looking for a way to sort the > branches in each repo summary page according to its age (newest > first). > I used "branch-sort=age" but it doesn't seem to work. > Here is my cgitrc file contents.

[PATCH 0/3] Fix some issues found by Coverity

2016-01-16 Thread John Keeping
These fix the three issues found by Coverity that are definitely incorrect. There are seven more issues which mostly look like false positives but I'm not sure if we should simply mark them as such or try to improve the situation with modelling. John Keeping (3): ui-log: handle parse_commit

[PATCH 3/3] cache: don't check for match with no key

2016-01-16 Thread John Keeping
ays will be in the code paths where we use slot->match. Coverity-id: 13807 Signed-off-by: John Keeping <j...@keeping.me.uk> --- cache.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cache.c b/cache.c index df1b4a3..6736a01 100644 --- a/cache.c +++ b/cache.c @@

[PATCH 1/3] ui-log: handle parse_commit() errors

2016-01-16 Thread John Keeping
we can report an error to the user at that point. Coverity-id: 13801 Signed-off-by: John Keeping <j...@keeping.me.uk> --- ui-log.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ui-log.c b/ui-log.c index 4573255..a4dc707 100644 --- a/ui-log.c +++ b/ui-log.c @@ -141

Re: [PATCH 0/3] Fix some issues found by Coverity

2016-02-08 Thread John Keeping
On Mon, Feb 08, 2016 at 03:33:07PM +0100, Jason A. Donenfeld wrote: > Merged, thanks. Did you mean to merge this to master as well as jd/zx2c4-deployment? (I just want to make sure it doesn't get lost in a future rebase, not a problem if this was intentional to test it before applying to master.)

[PATCH 2/2] ui-atom: avoid DATE_STRFTIME

2016-02-08 Thread John Keeping
ne here so we can use the date_mode_from_type() wrapper to simplify the code a bit. [1] https://tools.ietf.org/html/rfc4287#section-3.3 Signed-off-by: John Keeping <j...@keeping.me.uk> --- cgit.h| 5 - ui-atom.c | 11 --- 2 files changed, 4 insertions(+), 12 deletions(-) dif

Re: [PATCH 0/3] Fix some issues found by Coverity

2016-02-08 Thread John Keeping
17 00:00:00 2001 From: John Keeping <j...@keeping.me.uk> Date: Mon, 8 Feb 2016 14:12:35 + Subject: [PATCH] ui-stats: cast pointer before checking for zero We abuse the "void *util" field as a counter and recently started to cast it to a uintptr_t to avoid risking nasal demons

[PATCH 1/2] Avoid DATE_STRFTIME for long/short dates

2016-02-08 Thread John Keeping
e directly in cgit_date_mode(). Signed-off-by: John Keeping <j...@keeping.me.uk> --- cgit.h | 2 -- ui-commit.c | 4 ++-- ui-shared.c | 13 ++--- ui-shared.h | 2 +- ui-tag.c| 2 +- 5 files changed, 10 insertions(+), 13 deletions(-) diff --git a/cgit.h b/cgit.h index 501cb48

Re: [PATCH 1/1] css: use less blurry icon for external link

2016-02-23 Thread John Keeping
On Tue, Feb 23, 2016 at 10:47:25AM +0100, Christian Hesse wrote: > Your mileage may vary, but for me the old icon looks blurry. The new > one is character 0xf08e from OTF font awsome in size 10. > The icon color is black, gray level is adjusted via opacity. What's the licensing status of

Re: [PATCH 1/1] css: use less blurry icon for external link

2016-02-23 Thread John Keeping
On Tue, Feb 23, 2016 at 11:14:39AM +0100, Christian Hesse wrote: > John Keeping <j...@keeping.me.uk> on Tue, 2016/02/23 10:07: > > On Tue, Feb 23, 2016 at 10:47:25AM +0100, Christian Hesse wrote: > > > Your mileage may vary, but for me the old icon looks blurry. The ne

Re: [PATCH 2/2] ttl: Support different TTL times based on cache-control

2016-02-28 Thread John Keeping
On Fri, Feb 26, 2016 at 02:57:09PM -0600, Tim Nordell wrote: > Allow the client browser to pass in "max-age=0" and "no-cache" > to control a separate TTL time on the server for each type of > page. This extends the TTL field to have the additional form > of: > > some-ttl=5:1 > > where 5 is

Re: [PATCH 2/3] ui-repolist: Restructure internal logic to be more extensible

2016-02-28 Thread John Keeping
On Fri, Feb 26, 2016 at 02:58:58PM -0600, Tim Nordell wrote: > The internal logic has been restructured so that there is a "walking" > routine that filters the repo list based on the visible criteria, and > subsequently calls a given callback for each repo found. Additionally, > split out

Re: [PATCH 1/3] ui-repolist: Add section filter

2016-02-28 Thread John Keeping
On Fri, Feb 26, 2016 at 02:58:57PM -0600, Tim Nordell wrote: > This allows custom links to be added into the section headers by > configuring a filter to be applied in the repository list. > > Signed-off-by: Tim Nordell > > create mode 100644

Re: [PATCH 1/2] ui-shared: add homepage to tabs

2016-02-22 Thread John Keeping
On Mon, Feb 22, 2016 at 04:42:12PM +0100, Jason A. Donenfeld wrote: > Seems like a very useful feature. I'd like some feedback on though. > > It'd be nice to have this: > http://fortawesome.github.io/Font-Awesome/icon/external-link/ > or this: >

Re: [PATCH 1/2] ui-shared: add homepage to tabs

2016-02-23 Thread John Keeping
On Tue, Feb 23, 2016 at 03:26:28PM +0100, Jason A. Donenfeld wrote: > On Tue, Feb 23, 2016 at 7:49 AM, Peter Colberg wrote: > > Would you reconsider opening the homepage link in the current tab > > by default? This way visitors have the option to open the homepage > > in new

Re: premature exits bork cache

2016-02-26 Thread John Keeping
On Fri, Feb 26, 2016 at 01:29:21PM +0100, Jason A. Donenfeld wrote: > When caching is turned on, if we exit(0) early from a cmd, the cache > won't be properly finalized (or even sent), and we get a server error > because of blank output. I just fixed this bug with redirect: > >

[PATCH 5/8] ui: show ages in the originator's timezone

2016-01-19 Thread John Keeping
This affects the tooltip showing the full time and the case when a date is sufficiently old to be shown in full rather than as an offset. Signed-off-by: John Keeping <j...@keeping.me.uk> --- ui-log.c | 4 ++-- ui-refs.c | 6 +++--- ui-repolist.c | 2 +- ui-shared.c

[PATCH 0/8] Show times in the originator's timezone

2016-01-19 Thread John Keeping
es as well as Gitweb and other web frontends for Git repositories. [1] http://article.gmane.org/gmane.comp.version-control.cgit/2515 John Keeping (8): ui-shared: remove "format" from cgit_print_age() parsing: add timezone to ident structures ui-shared: add cgit_date_mode() u

[PATCH 4/8] ui-{commit,tag}: show dates in originator's timezone

2016-01-19 Thread John Keeping
This is done by switching to Git's show_date() function and the mode given by cgit_date_mode(). Signed-off-by: John Keeping <j...@keeping.me.uk> --- ui-commit.c | 6 -- ui-tag.c| 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/ui-commit.c b/ui-commit.c index 0

[PATCH 7/8] ui-atom: use show_date directly for atom dates

2016-01-19 Thread John Keeping
This will allow us to remove cgit_print_date and use Git's show_date consistently. Signed-off-by: John Keeping <j...@keeping.me.uk> --- ui-atom.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/ui-atom.c b/ui-atom.c index 11ea0c0..0bf2cf2 100644 --- a/ui-atom.c

[PATCH 6/8] ui-shared: use show_date for footer timestamp

2016-01-19 Thread John Keeping
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 0322968..9699524 100644 --- a/ui-shared.c +++ b/ui-shared.c @@ -797,7 +797,7 @@ void cgit_print_docend(void)

[PATCH 3/8] ui-shared: add cgit_date_mode()

2016-01-19 Thread John Keeping
This returns the correct mode value for use with Git's show_date() based on the current CGit configuration and will be used in the following patches. Signed-off-by: John Keeping <j...@keeping.me.uk> --- ui-shared.c | 9 + ui-shared.h | 1 + 2 files changed, 10 insertions(+) diff

[PATCH 2/8] parsing: add timezone to ident structures

2016-01-19 Thread John Keeping
This will allow us to mimic Git's behaviour of showing times in the originator's timezone when displaying commits and tags. Signed-off-by: John Keeping <j...@keeping.me.uk> --- cgit.h| 3 +++ parsing.c | 10 ++ 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/cg

Re: [PATCH 1/1] ui-plain: show directory listing for top of repo in plain view

2016-02-16 Thread John Keeping
On Mon, Feb 15, 2016 at 11:57:39PM -0800, Joe Anakata wrote: > unsigned to signed comparison was always false when at the root of the > tree Missing sign-off (see [1] for what this means). It would also be helpful if the commit message explains that in the "root of the tree" case match_baselen

Re: [PATCH 1/1] scan-tree: handle error in git_config_from_file()

2016-03-08 Thread John Keeping
On Tue, Mar 08, 2016 at 02:51:46PM +0100, Christian Hesse wrote: > From: Christian Hesse > > Signed-off-by: Christian Hesse Is this solving a particular problem or did you just notice that the return value is ignored? I don't think returning when this fails is

Re: [PATCH 1/1] scan-tree: handle error in git_config_from_file()

2016-03-08 Thread John Keeping
On Tue, Mar 08, 2016 at 04:01:59PM +0100, Christian Hesse wrote: > John Keeping <j...@keeping.me.uk> on Tue, 2016/03/08 14:59: > > On Tue, Mar 08, 2016 at 03:54:22PM +0100, Christian Hesse wrote: > > > John Keeping <j...@keeping.me.uk> on Tue, 2016/03/08 14:36: >

Re: [PATCH 1/1] scan-tree: handle error in git_config_from_file()

2016-03-08 Thread John Keeping
On Tue, Mar 08, 2016 at 03:54:22PM +0100, Christian Hesse wrote: > John Keeping <j...@keeping.me.uk> on Tue, 2016/03/08 14:36: > > On Tue, Mar 08, 2016 at 03:26:23PM +0100, Christian Hesse wrote: > > > John Keeping <j...@keeping.me.uk> on Tue, 2016/03/08 14:11: >

Re: [PATCH] ui-shared: split repository link into directories

2016-04-28 Thread John Keeping
On Thu, Apr 28, 2016 at 10:37:29PM +0200, Petr Vorel wrote: > Signed-off-by: Petr Vorel > --- > The only missing feature from gitweb: clickable any directory in between. It's > very handy, if you have lots of repos (local AOSP repositories). > If you don't like it hardcoded,

Re: [PATCH 1/1] ui-shared: Use CRLF in HTTP headers as per RFC 7230

2016-05-12 Thread John Keeping
On Wed, May 11, 2016 at 08:15:27PM +, Juuso Lapinlampi wrote: > On Wed, May 11, 2016 at 08:57:52PM +0100, John Keeping wrote: > > "generally recognized" is a bit nebulous, which is why a blanket policy > > is safer as well as much simpler to police. > > Guess we

Re: [PATCH 1/1] ui-shared: Simplify cgit_print_error_page() logic

2016-05-11 Thread John Keeping
On Wed, May 11, 2016 at 05:50:09PM +, Juuso Lapinlampi wrote: > --- > This may be a little controversial, but right now is there a reason not > to do this? No, I think this makes sense (although again we need your signed-off-by). Reviewed-by: John Keeping <j...@keeping.me.uk>

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

2016-05-11 Thread John Keeping
On Wed, May 11, 2016 at 06:04:16PM +, Juuso Lapinlampi wrote: > See: a24995bf8c55114044d6baf32ad5e8c3a04d924d You can't do this, the commit hash will be different when the patch is applied from an email. > This reverts commit 3c53ebfb57a5dba8fc65b2f99ebbfb635e34. Same comments apply as

Re: [PATCH 5/5] ui-shared: Remove a name attribute with an empty value

2016-05-11 Thread John Keeping
n-off is needed, but otherwise: Reviewed-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 0b7fdec..a0dec5e 100644 > --- a/ui-shared.c > +++ b/ui-shared.c &

Re: [PATCH 2/5] Revert "ui-summary: add "rel='vcs-git'" to clone URL links"

2016-05-11 Thread John Keeping
On Wed, May 11, 2016 at 06:04:15PM +, Juuso Lapinlampi wrote: > vcs-git is not a registered keyword. This microformat does not seem to > be very popular and will throw errors in HTML validators. > > Because the element leaves us with no sensible rel attribute to > use, there's no reason to

Re: Supporting Namespaces in cgit

2016-05-09 Thread John Keeping
On Mon, May 09, 2016 at 09:34:24PM +0100, Daniel Silverstone wrote: > One of the projects I am involved with is called Gitano[1] and is a Git server > along the lines of Gitolite or Gitosis, but not along the lines of Gitlab or > Gitorious. Among various technologies developed by other projects,

Re: [PATCH 1/1] RFC: git: update to v2.10.0-rc0

2016-08-15 Thread John Keeping
On Mon, Aug 15, 2016 at 10:13:19AM +0200, Christian Hesse wrote: > From: Christian Hesse > > Upstream continues to replace unsigned char *sha1 with struct > object_id old_oid. This makes the required changes. > > The upstream declaration of main function changed, resulting in >

Re: [PATCH 1/1] RFC: git: update to v2.10.0-rc0

2016-08-15 Thread John Keeping
On Mon, Aug 15, 2016 at 10:02:39AM +, Juuso Lapinlampi wrote: > Please keep the latest Git submodule at a stable version, e.g. 2.9.3 for > master branch. I'm okay with this change being in a pu branch, to be > merged to next and eventually master later. (Ignoring the fact that cgit > doesn't

[PATCH 3/4] ui-tag: clean up taginfo

2016-08-13 Thread John Keeping
Free the taginfo when we're done with it. Also reduce the scope of a couple of variables so that it's clear that this is the only path that uses the taginfo structure. Coverity-Id: 141883 Signed-off-by: John Keeping <j...@keeping.me.uk> --- ui-tag.c | 6 -- 1 file changed, 4 inse

[PATCH 1/4] shared: remove return value from cgit_free_commitinfo()

2016-08-13 Thread John Keeping
This return value is never used and the function always returns NULL. Signed-off-by: John Keeping <j...@keeping.me.uk> --- cgit.h | 2 +- shared.c | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/cgit.h b/cgit.h index 325432b..ec73dd3 100644 --- a/cgit.h +++ b/

[PATCH 2/4] shared: make cgit_free_taginfo() public

2016-08-13 Thread John Keeping
We will use this function from ui-tag.c in the next patch. Signed-off-by: John Keeping <j...@keeping.me.uk> --- cgit.h | 1 + shared.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/cgit.h b/cgit.h index ec73dd3..c625161 100644 --- a/cgit.h +++ b/cgit.h @@ -344,6

[PATCH 4/4] ui-tree: remove a fixed size buffer

2016-08-13 Thread John Keeping
As libgit.a moves away from using fixed size buffers, there is no guarantee that PATH_MAX is sufficient for all of the paths in a Git tree, so we should use a dynamically sized buffer here. Coverity-Id: 141884 Signed-off-by: John Keeping <j...@keeping.me.uk> --- ui-tree.c | 15 +---

Re: Display of directories that contain only one subdirectory

2016-07-13 Thread John Keeping
ave only a single element in a directory (for example in Java package paths), display multiple directories in one go so that it is possible to navigate directly to the first directory that contains either files or multiple directories. Signed-off-by: John Keeping <j...@keeping.me.uk> --- ui-tree.c | 70 +

Re: [PATCH] ui-shared: fix segfault when defbranch is NULL

2016-07-06 Thread John Keeping
On Wed, Jul 06, 2016 at 07:08:01AM +, Eric Wong wrote: > Not sure if there's a better fix for this. defbranch is > NULL here on my setup when a crawler hit an invalid URL, > causing strcmp to segfault. > > Signed-off-by: Eric Wong > --- > ui-shared.c | 2 +- > 1 file

[PATCH 2/2] ui-ssdiff: fix decl-after-statement warnings

2016-08-07 Thread John Keeping
git.git's coding style avoids decl-after-statement and we generally try to follow it but a few warnings have crept in recently. Fix the one in ui-ssdiff.c Signed-off-by: John Keeping <j...@keeping.me.uk> --- ui-ssdiff.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --gi

Re: Display of directories that contain only one subdirectory

2016-08-07 Thread John Keeping
On Wed, Jul 13, 2016 at 06:43:06PM -0400, Jamie Couture wrote: > So what I was initially wasting my time worrying about was an insane > situation > where there are many empty directories with only one file at the end of the > tunnel. > > mkdir -p >

Re: Display of directories that contain only one subdirectory

2016-08-07 Thread John Keeping
On Thu, Jul 14, 2016 at 08:12:09PM +0200, Erik Brangs wrote: > On 13.07.2016 21:49, John Keeping wrote: > > It turns out it's not too difficult, patch below. This is slightly > > different from Github's behaviour because it allows clicking on > > intermediate directories

[PATCH 1/2] ui-shared: fix decl-after-statement warnings

2016-08-07 Thread John Keeping
git.git's coding style avoids decl-after-statement and we generally try to follow it but a few warnings have crept in recently. Fix the ones in ui-shared.c Signed-off-by: John Keeping <j...@keeping.me.uk> --- ui-shared.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-)

Re: [RFC] ui-repolist: Allow sections to be collapsible

2016-08-07 Thread John Keeping
On Sun, Aug 07, 2016 at 02:33:41PM -0500, Andy Doan wrote: > This is a rough work-in-progress, but I wanted to get our take on whether > or not you'd be interested in this type of functionality: > > The index page can be difficult to navigate for really large git > servers. This change allows a

Re: [RFC] ui-repolist: Allow sections to be collapsible

2016-08-08 Thread John Keeping
On Sun, Aug 07, 2016 at 10:02:34PM -0500, Andy Doan wrote: > On 08/07/2016 02:57 PM, John Keeping wrote: > > On Sun, Aug 07, 2016 at 02:33:41PM -0500, Andy Doan wrote: > >> This is a rough work-in-progress, but I wanted to get our take on whether > >> or not you'd

[PATCH 2/3] parsing: clear query path before starting

2017-02-19 Thread John Keeping
s segfault, but it makes no sense for us to clear ctx.repo while leaving ctx.qry.path set to the previous value, so let's just clear it here so that the last "url" parameter given takes full effect rather than partially overriding the effect of the previous value. Signed-off-by: John Keeping

[PATCH 3/3] cgit: don't set vpath unless repo is set

2017-02-19 Thread John Keeping
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 <j...@keeping.me.uk> --- cgit.c | 12 ++---

[PATCH 0/3] Fix segfault found by AFL

2017-02-19 Thread John Keeping
lly rather than some combination of that and a previous URL. [0] http://lcamtuf.coredump.cx/afl/ John Keeping (3): ui-shared: don't print path crumbs without a repo parsing: clear query path before starting cgit: don't set vpath unless repo is set cgit.c | 12 ++-- par

[PATCH 1/3] ui-shared: don't print path crumbs without a repo

2017-02-19 Thread John Keeping
a query string like "?p=log=foo/bar" to end up here without a valid repository. This was found by American fuzzy lop [0]. [0] http://lcamtuf.coredump.cx/afl/ Signed-off-by: John Keeping <j...@keeping.me.uk> --- ui-shared.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

[PATCH 2/3] Remove angle brackets from {author,committer}_email

2017-02-24 Thread John Keeping
that the email address will always be provided in the correct form. Signed-off-by: John Keeping <j...@keeping.me.uk> Signed-off-by: Jason A. Smith <smit...@bnl.gov> --- filter.c| 10 +- parsing.c | 6 +- ui-atom.c | 13 + ui-commit.c | 6 -- ui-tag.c

[PATCH 1/3] filter: introduce cgit_open_email_filter() wrapper

2017-02-24 Thread John Keeping
We provide email addresses to the email filter surrounded by angle brackets, but we will soon remove these in our internal representation. Introduce a wrapper so that we only have to add them in one place. Signed-off-by: John Keeping <j...@keeping.me.uk> Signed-off-by: Jason A. Smith

Re: possible bug in config readme

2017-02-19 Thread John Keeping
ry "cat -E cgitrc" to show this). > Am 18.02.2017 um 17:57 schrieb John Keeping: > > On Tue, Jan 24, 2017 at 11:19:09PM +0100, MonkZ wrote: > >> i'm using cgit 1.1 and trying to configure a global list of possible > >> readme files (see attachment), but all i can

Re: patch links do not have stable checksums

2017-02-18 Thread John Keeping
tch: allow overriding signature Add a configuration option to allow specifying the signature displayed at the bottom of patch output, in a similar way to the "--signature" option to git-format-patch. Signed-off-by: John Keeping <j...@keeping.me.uk> --- cgit.c | 2 ++ cgit.h | 1 +

[PULL] Fix escaping in atom output

2017-02-18 Thread John Keeping
here. [0] https://lists.zx2c4.com/pipermail/cgit/2017-January/003454.html John Keeping (1): ui-atom: properly escape delimiter in page link ui-atom.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion

Re: possible bug in config readme

2017-02-18 Thread John Keeping
On Tue, Jan 24, 2017 at 11:19:09PM +0100, MonkZ wrote: > i'm using cgit 1.1 and trying to configure a global list of possible > readme files (see attachment), but all i can get to work are > "cgit.readme" entries in git-config files. > > I would expect, that this list would be active until a repo

Re: [PATCH] ui-log: add option to show all refs

2017-02-18 Thread John Keeping
On Fri, Feb 03, 2017 at 08:06:06PM -0800, Bertrand Roussel wrote: > Add option 'show-all-refs' and 'repo.show-all-refs' to display references > that are not tags or branches. Missing Signed-off-by tag (see [0]). Other than that, I wonder why this doesn't touch ui-refs.c or ui-summary.c. If this

Re: [PATCH v6 1/1] ui-shared: allow to split the repository link

2017-02-18 Thread John Keeping
;repo.name" set different than "repo.url". > > Signed-off-by: Petr Vorel <petr.vo...@gmail.com> > Cc: "Jason A. Donenfeld" <ja...@zx2c4.com> > Cc: John Keeping <j...@keeping.me.uk> With one minor nit below, Reviewed-by: John Keeping <j...@ke

Re: [PATCH] Add support for git's mailmap.

2016-08-24 Thread John Keeping
On Wed, Aug 24, 2016 at 05:27:31PM -0400, Jason A. Smith wrote: > I will send a new updated patch that I think will fix most of the minor > issues, but I am not exactly sure what you mean by the last note. > > On 08/24/2016 03:23 PM, John Keeping wrote: > >> +int cgit_map_us

[RFC/PATCH 5/5] ui-tree: use render filters to display content

2016-09-03 Thread John Keeping
This allows applying filters to files in the repository, for example to render Markdown or AsciiDoc as HTML. Signed-off-by: John Keeping <j...@keeping.me.uk> --- cgit.css | 5 +++ cmd.c | 4 +-- ui-tree.c | 104 +- ui-

[RFC/PATCH 3/5] Parse render filters from the config

2016-09-03 Thread John Keeping
Render filters will be used to present rendered content in the tree view, for example to display Markdown source rendered as HTML. We will add support for using these from the tree view in the following commits. Signed-off-by: John Keeping <j...@keeping.me.uk> --- cgit.c

[RFC/PATCH 1/5] Use string list strdup_strings for mimetypes

2016-09-03 Thread John Keeping
There's no need to do this manually with the string list API will do it for us. Signed-off-by: John Keeping <j...@keeping.me.uk> --- This is a preliminary cleanup I noticed while in the area. cgit.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cgit.c b/cgit.c

[PATCH 2/3] Remove angle brackets from {author,committer}_email

2016-08-29 Thread John Keeping
that the email address will always be provided in the correct form. Signed-off-by: John Keeping <j...@keeping.me.uk> Signed-off-by: Jason A. Smith <smit...@bnl.gov> --- filter.c| 10 +- parsing.c | 6 +- ui-atom.c | 13 + ui-commit.c | 6 -- ui-tag.c

[PATCH 1/3] filter: introduce cgit_open_email_filter() wrapper

2016-08-29 Thread John Keeping
We provide email addresses to the email filter surrounded by angle brackets, but we will soon remove these in our internal representation. Introduce a wrapper so that we only have to add them in one place. Signed-off-by: John Keeping <j...@keeping.me.uk> Signed-off-by: Jason A. Smith

Re: reduce number of tags in log/summary view

2016-10-09 Thread John Keeping
On Wed, Oct 05, 2016 at 10:10:42PM -0700, Radha Mohan wrote: > I am looking for an option (if any) in cgitrc that can reduce the > number for tags of branch shown in log view or summary view. > > I have a situation where a branch is tagged by our automatic build > systems. If on some branch the

Re: [PATCH] Use skip_prefix() to get rid of magic constants

2016-10-09 Thread John Keeping
On Sat, Oct 08, 2016 at 03:46:09PM +0200, Lukas Fleischer wrote: > Signed-off-by: Lukas Fleischer <lfleisc...@lfos.de> Nice clean up! Reviewed-by: John Keeping <j...@keeping.me.uk> > --- > cgit.c | 56 ++-- > scan

Re: [PATCH 1/1] ui-log: fix data corruption

2016-10-09 Thread John Keeping
On Fri, Oct 07, 2016 at 11:21:23PM +0200, Christian Hesse wrote: > "Jason A. Donenfeld" on Fri, 2016/10/07 21:43: > > Does this ever get freed, though? > > I ran cgit in valgrind with this patch applied. No changes in what is lost - > so looks like this is freed later on. It

[PULL] Fix patch path limit

2016-10-09 Thread John Keeping
now up to about three years since we introduced this regression, so it's about time we fix it! John Keeping (1): patch: reapply path limit ui-patch.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions

[PATCH 1/3] filter: introduce cgit_open_email_filter() wrapper

2016-08-26 Thread John Keeping
We provide email addresses to the email filter surrounded by angle brackets, but we will soon remove these in our internal representation. Introduce a wrapper so that we only have to add them in one place. Signed-off-by: John Keeping <j...@keeping.me.uk> Signed-off-by: Jason A. Smith

[PATCH 2/3] Remove angle brackets from {author,committer}_email

2016-08-26 Thread John Keeping
that the email address will always be provided in the correct form. Signed-off-by: John Keeping <j...@keeping.me.uk> Signed-off-by: Jason A. Smith <smit...@bnl.gov> --- filter.c| 10 +- parsing.c | 6 +- ui-atom.c | 13 + ui-commit.c | 6 -- 4 files

Re: [PATCH 3/3] Add support for git's mailmap.

2016-08-29 Thread John Keeping
On Mon, Aug 29, 2016 at 11:18:16AM -0400, Jason A. Smith wrote: > On 08/26/2016 07:13 PM, John Keeping wrote: > > On Fri, Aug 26, 2016 at 05:30:32PM -0400, Jason A. Smith wrote: > >> > >> Sorry for the extra email noise, but while fixing these I found two more >

[PATCH 2/2] Remove angle brackets from {author,committer}_email

2016-08-25 Thread John Keeping
that the email address will always be provided in the correct form. Signed-off-by: John Keeping <j...@keeping.me.uk> --- filter.c| 10 +- parsing.c | 6 +- ui-atom.c | 13 + ui-commit.c | 6 -- 4 files changed, 15 insertions(+), 20 deletions(-) diff --git a/filt

[PATCH 1/2] filter: introduce cgit_open_email_filter() wrapper

2016-08-25 Thread John Keeping
We provide email addresses to the email filter surrounded by angle brackets, but we will soon remove these in our internal representation. Introduce a wrapper so that we only have to add them in one place. Signed-off-by: John Keeping <j...@keeping.me.uk> --- It might b

Re: [PATCH] Add support for git's mailmap.

2016-08-25 Thread John Keeping
On Thu, Aug 25, 2016 at 03:22:35PM -0400, Jason A. Smith wrote: > On 08/24/2016 06:30 PM, John Keeping wrote: > > On Wed, Aug 24, 2016 at 05:27:31PM -0400, Jason A. Smith wrote: > >> Are you proposing to remove the angle brackets around the email address > >> everywher

Re: RFE: render MD/RST documents in tree view

2016-08-24 Thread John Keeping
On Wed, Aug 24, 2016 at 07:19:20AM +, Juuso Lapinlampi wrote: > source-filter is good enough? I don't want cgit to become a GitLab-ish > platform with all this featuritis. source-filter doesn't suppress the line numbers, which render as a separate table cell, and it wraps the content in .

Re: [PATCH] Add support for git's mailmap.

2016-08-24 Thread John Keeping
On Wed, Aug 24, 2016 at 02:28:16PM -0400, Jason A. Smith wrote: > > If a mailmap file is present in the repo, it will be used to coalesce > commits by the same person, just like git does. When no mailmap file is > found then it functions as before. Missing sign-off, see [1] for what this means.

Re: cgit: No repositories found

2016-09-26 Thread John Keeping
Please try to send plain text email, I've had to reformat this heavily to make it readable. On Fri, Sep 23, 2016 at 11:41:25PM +, Gary Yang wrote: > After I setup cgit. I got "No repositories found". It is CentOS 7.2 platform. > Please help. Here are what I did. > > 1. After installed

Re: SIGPIPE from syntax highlighting filter if highlight is not available

2016-10-01 Thread John Keeping
On Thu, Sep 29, 2016 at 04:38:41PM +0200, Vadim Zeitlin wrote: > As this is the first time I'm posting here, let me start by thanking you > for developing cgit! I'm using it since quite some time under Debian > (currently Jessie) and it works very well but recently I've mistakenly > removed

[PATCH] cgit: ignore SIGPIPE

2016-10-01 Thread John Keeping
some form of error message with a more generic exit status rather than die silently with WTERMSIG() == SIGPIPE. Signed-off-by: John Keeping <j...@keeping.me.uk> --- On Sat, Oct 01, 2016 at 12:33:00PM +0100, John Keeping wrote: > On Thu, Sep 29, 2016 at 04:38:41PM +0200, Vadim Zeit

Re: [PATCH] cgit: ignore SIGPIPE

2016-10-02 Thread John Keeping
On Sat, Oct 01, 2016 at 10:52:11PM +0200, Jason A. Donenfeld wrote: > I see the utility of this with something like a highlight filter gone > bad. But is it safe to do this in the context of an authentication > filter? What's the failure behavior like once this patch is applied? If we ignore

Re: Could snapshot links be named after git describe ?

2016-10-23 Thread John Keeping
On Mon, Oct 10, 2016 at 11:04:11AM +0200, Sylvain Rabot wrote: > Currently the snapshots and resulted downloaded files are named like > this -. > > I was wondering if they could be named using the git describe format > instead. I think it would make more sens and

Re: [PATCH v5 1/1] ui-shared: allow to split the repository link

2016-11-24 Thread John Keeping
On Thu, Nov 24, 2016 at 06:42:32PM +0100, Jason A. Donenfeld wrote: > On Thu, Nov 24, 2016 at 6:32 PM, Petr Vorel wrote: > > Any idea how to cope with it? I thought to use this feature only if > > repo.name and repo.url > > are the same. > > One way might be to always use

Re: Crash when using path limit in ui-patch.c

2016-11-24 Thread John Keeping
On Thu, Nov 24, 2016 at 10:57:22AM +0100, Florian Pritz wrote: > I get the following backtrace when trying to use the path limit feature > while getting a patch. > > > #0 0x00467bb5 in prefix_pathspec (item=0x77ba48, > > p_short_magic=0x7fffb2e8, raw=0x76e488, flags=0, prefix=0x0,

Re: Feature Request: show ages in tree view

2016-11-24 Thread John Keeping
On Sun, Oct 30, 2016 at 01:22:24PM +0100, Silly Slux wrote: > i want to see when a file or tree was last changed when i'm watching > the tree of a repository. I've tried to implement it myself, but it > seems i can't, though i have something to illustrate what i mean. This is going to be quite a

Re: [PATCH 1/1] RFC: git: update to v2.11.0-rc3

2016-11-24 Thread John Keeping
On Thu, Nov 24, 2016 at 09:09:43AM +0100, Christian Hesse wrote: > From: Christian Hesse <m...@eworm.de> > > Update to git version v2.11.0-rc3. Function write_archive() dropped > argument (int setup_prefix). > > Signed-off-by: Christian Hesse <m...@eworm.de>

Re: Cache system

2016-10-09 Thread John Keeping
On Sun, Oct 09, 2016 at 08:24:20PM +0200, Sylvain Rabot wrote: > As far as I understand it the cgit cache system relies only on the > path of a request (the PATH_INFO var to be precise). > > The cgit setup I made is not compatible with this cache system because > I use http for public

Re: [PATCH 1/1] ui-blog: fix oid handling

2016-10-16 Thread John Keeping
char sha1[20]' with 'struct object_id oid'). > > Signed-off-by: Christian Hesse <m...@eworm.de> Reviewed-by: John Keeping <j...@keeping.me.uk> > --- > ui-blob.c | 10 +- > 1 file changed, 5 insertions(+), 5 deletions(-) > > diff --git a/ui-blob.c b/ui-blob

Re: [PATCH 1/1] ui-log: fix data corruption

2016-10-16 Thread John Keeping
On Wed, Oct 12, 2016 at 01:23:45PM +0200, Jason A. Donenfeld wrote: > So what's the verdict here? Do we have a double free or not? The current code is fine, providing we don't re-order it. The issue is that we free commit blobs while walking the log, so any attempt to use them after that without

Re: Linking cgit with Lua using -Wl,-E

2016-10-16 Thread John Keeping
On Sun, Oct 16, 2016 at 07:30:08AM +0200, Дилян Палаузов wrote: > on my system I wanted to link cgit with lua, so that lua can load the > (lua)crypto.so module. For this to work the symbol lua_gettop has to > be exported by cgit. I managed this by passing "-Wl,-E" to the > linker, when compiling

Re: Atom feed of package repo have non-escaped href

2017-01-04 Thread John Keeping
On Tue, Jan 03, 2017 at 10:00:20PM -0800, Nodiv Byzero wrote: > I'm investigating issue in Arch Aurweb > https://bugs.archlinux.org/task/51968?project=2 > > where feed is broken, because href contains an & not "" > Check this out: https://aur.archlinux.org/cgit/aur.git/atom/?h=pacaur > > Could

Re: [PATCH] filter: set environment variable PYTHONIOENCODING to utf-8

2017-03-17 Thread John Keeping
On Fri, Mar 17, 2017 at 07:07:02PM +0100, Jason A. Donenfeld wrote: > On Sun, Mar 12, 2017 at 6:51 PM, John Keeping <j...@keeping.me.uk> wrote: > > While I'm inclined to agree with this, in this particular case we > > explicitly encode pages as UTF-8 so there is an ar

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

2017-03-04 Thread John Keeping
mething like this instead? -- >8 -- The definition of struct pathspec_item has changed with the expectation that pathspecs will be managed dynamically. We work around this a bit by setting up a static structure, but let's allocate the match string to avoid needing to cast away const. Signe

Re: [PATCH] filter: set environment variable PYTHONIOENCODING to utf-8

2017-03-04 Thread John Keeping
On Thu, Feb 23, 2017 at 03:48:23PM +, Roy Marples wrote: > This allows different versions of Python to be used rather than > forcing version specific encoding in each script. > > Signed-off-by: Roy Marples > --- > filter.c | 8 >

[PULL] Collected patches

2017-03-12 Thread John Keeping
up to da76e84d09c6d153a072fc73aed8347af59d32db: ui-plain: print symlink content (2017-03-12 14:14:57 +) ---- John Keeping (5): ui-atom: properly escape delimiter in page link ui-shared: don't print path crumbs without a repo parsing: clear query p

Re: cgit and symlinks

2017-03-12 Thread John Keeping
On Thu, Mar 09, 2017 at 08:58:43AM +0100, MonkZ wrote: > Am 09.03.2017 um 01:15 schrieb John Keeping: > > On Wed, Mar 08, 2017 at 02:28:11PM +0100, MonkZ wrote: > >> > >> > >> Am 08.03.2017 um 13:30 schrieb John Keeping: > >>> On Wed, Mar 08,

Re: [PATCH v7 1/1] ui-shared: allow to split the repository link

2017-03-12 Thread John Keeping
;repo.name" set different than "repo.url". > > Signed-off-by: Petr Vorel <petr.vo...@gmail.com> > Cc: "Jason A. Donenfeld" <ja...@zx2c4.com> > Cc: John Keeping <j...@keeping.me.uk> > Reviewed-by: John Keeping <j...@keeping.me.uk> > ---

<    1   2   3   4   5   >