[PATCH 3/3] html: remove unused functions

2017-03-12 Thread John Keeping
The previous commit removed the only use of these functions, so let's remove them. Signed-off-by: John Keeping <j...@keeping.me.uk> --- html.c | 20 html.h | 2 -- 2 files changed, 22 deletions(-) diff --git a/html.c b/html.c index e7e6e07..e4dbb05 100644 --- a/

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

[PATCH 2/3] ui-{repolist,atom}: fix repository URL escaping

2017-03-12 Thread John Keeping
escaping functions to let us keep cgit_repourl() and return a suitable escaped string, but there's no need for us to be doing memory management here so this ends up simplifying the call sites. Signed-off-by: John Keeping <j...@keeping.me.uk> --- tests/t0101-index.sh | 2 +- ui-atom.c

[PATCH 1/3] tests: document handling of repository names with spaces

2017-03-12 Thread John Keeping
t0103-log.sh has a test to check that we don't properly escape spaces in repository URLs, but no other tests do. It turns out that the handling of this case in the index page is broken, so mark this as test_expect_failure while adding successful tests for all other pages. Signed-off-by: John

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

2017-03-12 Thread John Keeping
On Sun, Mar 12, 2017 at 10:01:10AM -0700, Jason A. Donenfeld wrote: > Sorry for the delay. I'm currently on the road traveling and won't be > properly back at my desk until the end of next week. > > However, my initial reaction is that hard coding various > interpreter-specific environment

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

2017-03-12 Thread John Keeping
e > > "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> >

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

2017-03-10 Thread John Keeping
On Thu, Mar 09, 2017 at 12:18:10AM +, 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 <r...@marples.name> Reviewed-by: John Keeping <j...@keeping.me.u

Re: cgit and symlinks

2017-03-08 Thread John Keeping
On Wed, Mar 08, 2017 at 12:38:38PM +0100, MonkZ wrote: > Am 07.03.2017 um 00:35 schrieb John Keeping: > > We can't reliably follow the link because there is no guarantee that the > > target lies within the repository and I don't know what we would output > > for the case w

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

2017-03-08 Thread John Keeping
On Wed, Mar 08, 2017 at 07:01:59PM +, Roy Marples wrote: > On 06/03/2017 09:14, Roy Marples wrote: > > On 04/03/2017 12:35, John Keeping wrote: > >> On Thu, Feb 23, 2017 at 03:48:23PM +, Roy Marples wrote: > >>> This allows different versions of Python to be

Re: cgit and symlinks

2017-03-08 Thread 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, 2017 at 12:38:38PM +0100, MonkZ wrote: > >> Am 07.03.2017 um 00:35 schrieb John Keeping: > >>> We can't reliably follow th

Re: cgit and symlinks

2017-03-06 Thread John Keeping
gt;8 -- Subject: [PATCH] ui-plain: print symlink content We currently ignore symlinks in ui-plain, leading to a 404. In ui-tree we print the content of the blob (that is, the path to the target of the link), so it makes sense to do the same here. Signed-off-by: John Keeping <j...@keeping.me.uk>

Re: cgit segfaults

2017-08-16 Thread John Keeping
On Wed, Aug 16, 2017 at 01:26:52AM -0500, Robby Workman wrote: > We're running cgit-1.1 with git-2.10.4 at https://git.slackbuilds.org and are > seeing > some reproducible segfaults. > > root@git:/var/log# dmesg -T > [Wed Aug 16 01:14:23 2017] traps: cgit.cgi[2210] general protection ip:4515bd

Re: [PATCH v2] git: update to v2.14

2017-08-10 Thread John Keeping
On Wed, Aug 09, 2017 at 07:02:56PM -0500, Jeff Smith wrote: > Numerous changes were made to git functions to use an object_id > structure rather than sending sha1 hashes as raw unsigned character > arrays. The functions that affect cgit are: parse_object, > lookup_commit_reference, lookup_tag,

Re: [RFC PATCH 1/4] git: update to v2.14

2017-07-22 Thread John Keeping
, so when 2.14 final is out and we can update the Makefile to a tag: Reviewed-by: John Keeping <j...@keeping.me.uk> > --- > git | 2 +- > shared.c | 2 +- > ui-blob.c | 6 +++--- > ui-clone.c| 2 +- > ui-commit.c | 4 ++-- > ui-diff.c

Re: [RFC PATCH 2/4] ui-blame: create placeholder and links

2017-07-22 Thread John Keeping
On Wed, Jun 07, 2017 at 09:18:08PM -0500, Jeff Smith wrote: > Create a placeholder for and links to a page that will contain the > 'blame' for a file in the repository. > > Signed-off-by: Jeff Smith > --- > cgit.mk | 1 + > cmd.c | 8 ++- > ui-blame.c | 160 >

Re: [RFC PATCH 4/4] ui-blame: fill in the contents

2017-07-22 Thread John Keeping
On Wed, Jun 07, 2017 at 09:18:10PM -0500, Jeff Smith wrote: > Use the blame interface added in libgit to output the blame information > of a file in the repository. > > Signed-off-by: Jeff Smith > --- > cgit.css | 8 +++ > ui-blame.c | 214 >

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

2017-07-22 Thread John Keeping
owned memory) 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. >

Re: [PATCH 04/07] Inject repo authorization filter. Provide sample for gitolite integration.

2017-07-22 Thread John Keeping
On Fri, Jun 23, 2017 at 06:57:12PM +0200, Georg Faerber wrote: > Any chance of getting this merged? The code changes look reasonable from a cursory reading, but all of the patches are missing commit messages, and far more importantly are not signed off (see

Re: [RFC PATCH 3/4] ui-blame: create needed html_ntxt_noellipsis function

2017-07-22 Thread John Keeping
On Wed, Jun 07, 2017 at 09:18:09PM -0500, Jeff Smith wrote: > For implementing a ui-blame page, there is need for a function that > outputs a selection from a block of text, transformed for HTML output, > but with no further modifications or additions. > > Signed-off-by: Jeff Smith

Re: [RFC PATCH 0/4] Add ui-blame

2017-07-22 Thread John Keeping
On Wed, Jun 07, 2017 at 09:18:06PM -0500, Jeff Smith wrote: > I split git blame functionality into libgit, and the changes were > accepted upstream a few days ago. Now that the git infrastructure is in > place, it is time to get back to the cgit part. > > The first patch advances git to current

Re: your mail

2017-07-22 Thread John Keeping
On Tue, May 09, 2017 at 03:35:57AM -0400, Ghost Squad 57 wrote: > Lately I've gotten into the habit of signing commits and tags with my GPG > key (https://git-scm.com/book/en/v2/Git-Tools-Signing-Your-Work) > > But it appears cgit doesn't support showing commits that have been signed. > > Is

Re: Sorting directories before files in tree view

2017-07-21 Thread John Keeping
On Fri, Jul 21, 2017 at 09:13:33PM +0530, John wrote: > Is this possible?. Not without significant changes to ui-tree.c. Currently we output items in the order they appear in the tree object being displayed (by definition, this is lexicographically sorted). Displaying them in a different order

[PATCH] cache: flush stdio before restoring FDs

2017-04-24 Thread John Keeping
to stdout internally. Let's avoid risking more places doing this by ensuring that stdout is flushed after writing in fill_slot(). Signed-off-by: John Keeping <j...@keeping.me.uk> --- On Mon, Apr 24, 2017 at 11:54:40AM -0400, Konstantin Ryabitsev wrote: > Very reminiscent of a fix for u

Re: [PATCH 0/4] Advance to git 2.14

2017-08-08 Thread John Keeping
On Tue, Aug 08, 2017 at 07:03:01AM -0500, Jeff Smith wrote: > This set of patches advances git to v2.14, and makes the neccessary > changes in cgit to build with it. My ui-blame changes depend on > v2.14 and will thus depend on these changes. I haven't pulled this to test, but it looks like the

Re: CGit in subdomain

2017-05-17 Thread John Keeping
On Fri, May 12, 2017 at 06:54:31PM +0200, Santi Moreno wrote: > On 12 may, John Keeping wrote: > > On Fri, May 12, 2017 at 05:48:29PM +0200, Santi Moreno wrote: > > > I trying to config CGit in a server and all it's fine in the link > > > domain.org/cgit but I try confi

Re: CGit in subdomain

2017-05-12 Thread John Keeping
On Fri, May 12, 2017 at 05:48:29PM +0200, Santi Moreno wrote: > I trying to config CGit in a server and all it's fine in the link > domain.org/cgit but I try config with Apache2 in subdomain > git.domain.org but the cgit.css not it's apply. I don't understand why > the default path in cgitrc is

Re: Bug: SIGSEGV in OPENSSL_cleanse

2017-05-22 Thread John Keeping
On Mon, May 22, 2017 at 07:54:53PM +0200, Jan Jancar wrote: > I am, or rather was, running an instance of cgit on an ARM box: > > > uname -srm > Linux 4.9.28-2-ARCH armv6l > > I run ArchLinuxARM and they recently had an update to openssl: > > openssl 1.1.0.e-1 > openssl-1.0

Re: RFE: have a way to request compressed patches and rawdiffs

2017-05-01 Thread John Keeping
he end of "patch": https://git.zx2c4.com/cgit/patch.gz/?id=8e9ddd21a50beb9fd660cf6cd6a583234924b932 and the content will be returned compressed with gzip. I've only added gzip for now, but the setup is table driven so adding more compression filters should be straightforward.

Re: Customization of log view

2017-05-01 Thread John Keeping
Hi Simon, On Sun, Apr 30, 2017 at 02:20:05PM +, Simon Steinbeiss wrote: > I couldn't find any information on this, so excuse me if you've heard this > question (or: request?) a gazillion times before. > We've been using cgit for Xfce for many years and we're really happy about > it. Recently

Re: [RFCv2 PATCH 0/7] Add ui-blame

2017-09-23 Thread John Keeping
On Fri, Sep 22, 2017 at 10:38:41PM -0500, Jeff Smith wrote: > I split git blame functionality into libgit, and the changes were > accepted upstream and are a part of git 2.14. Now that the git > infrastructure is in place, here is what is needed for cgit to make use > of it. > > Jeff Smith (7):

Re: [RFCv2 PATCH 2/7] ui-blame: create framework

2017-09-23 Thread John Keeping
On Fri, Sep 22, 2017 at 10:38:43PM -0500, Jeff Smith wrote: > Create framework for a page that will contain the 'blame' for a file > in the repository. > > Signed-off-by: Jeff Smith > --- > ui-blame.c | 160 > + >

Re: [RFCv2 PATCH 1/7] ui-blame: create enable-blame config item

2017-09-23 Thread John Keeping
On Fri, Sep 22, 2017 at 10:38:42PM -0500, Jeff Smith wrote: > Signed-off-by: Jeff Smith > --- > cgit.c | 3 +++ > cgit.h | 1 + > cgitrc.5.txt | 5 + > 3 files changed, 9 insertions(+) > > diff --git a/cgit.c b/cgit.c > index 1dae4b8..c03f69c 100644 > ---

Re: [RFCv2 PATCH 5/7] ui-blame: pull blame info from libgit

2017-09-23 Thread John Keeping
On Fri, Sep 22, 2017 at 10:38:46PM -0500, Jeff Smith wrote: > Use the blame interface added in libgit to output the blame information > of a file in the repository. > > Signed-off-by: Jeff Smith > --- > diff --git a/ui-blame.c b/ui-blame.c > index 901ca89..cc4457a 100644 >

Re: [RFCv2 PATCH 3/7] ui-blame: create links

2017-09-23 Thread John Keeping
On Fri, Sep 22, 2017 at 10:38:44PM -0500, Jeff Smith wrote: > Create links to the blame page. > > Signed-off-by: Jeff Smith > --- > ui-shared.c | 20 +--- > ui-shared.h | 3 +++ > ui-tree.c | 10 +- > 3 files changed, 29 insertions(+), 4

Re: [RFCv2 PATCH 4/7] ui-blame: html_ntxt with no ellipsis

2017-09-23 Thread John Keeping
On Fri, Sep 22, 2017 at 10:38:45PM -0500, Jeff Smith wrote: > For implementing a ui-blame page, there is need for a function that > outputs a selection from a block of text, transformed for HTML output, > but with no further modifications or additions. > > Signed-off-by: Jeff Smith

Re: [PATCH 0/5] Add ui-blame

2017-10-03 Thread John Keeping
On Tue, Oct 03, 2017 at 01:29:59AM +0200, Christian Hesse wrote: > Jeffrey Smith on Mon, 2017/10/02 17:35: > > From what I can see, it appears that it is in ch/for-jason. > > > > Also, I noticed a typo in my html_ntxt patch: > > ssize_t slen = (size_t) len; > >should be >

Re: [PATCH 0/4] adding color to ui-blame

2017-10-14 Thread John Keeping
On Sat, Oct 14, 2017 at 04:17:46PM +0200, Jason A. Donenfeld wrote: > This patch set is currently broken, because in the exec filter, > processes like to buffer their output. The result is that the text winds > up at the bottom: > > https://git.zx2c4.com/cgit/blame/cache.c > > If anybody

[PATCH] parsing: don't clear existing state with empty input

2017-10-14 Thread John Keeping
since before the commit mentioned above, for example: .../cgit?r=git=log Fix both of these by allowing the previous state to persist if PATH_INFO is empty, falling back to the query parameters if no path has been requested. Reported-by: Tom Ryder <t...@sanctum.geek.nz> S

Re: [RFCv2 PATCH 5/7] ui-blame: pull blame info from libgit

2017-09-24 Thread John Keeping
ange > > should clean some things up a lot. > > > > On Sat, Sep 23, 2017 at 10:47 AM, John Keeping <j...@keeping.me.uk> wrote: > >> On Fri, Sep 22, 2017 at 10:38:46PM -0500, Jeff Smith wrote: > >>> Use the blame interface added in libgit

Re: [PATCH 3/5] ui-shared: make a char* parameter const

2017-09-30 Thread John Keeping
* will avoid the need to make copies of const char* strings > being passed to cgit_commit_link. > > Signed-off-by: Jeff Smith <whydo...@gmail.com> Reviewed-by: John Keeping <j...@keeping.me.uk> > --- > ui-shared.c | 19 --- > ui-shared.h | 2 +- > 2

Re: [PATCH 5/5] ui-tree: link to blame UI if enabled

2017-09-30 Thread John Keeping
On Wed, Sep 27, 2017 at 05:43:31PM -0500, Jeff Smith wrote: > Create links to the blame page. > > Signed-off-by: Jeff Smith <whydo...@gmail.com> Reviewed-by: John Keeping <j...@keeping.me.uk> > --- > ui-shared.c | 20 +--- > ui-shared.

Re: [PATCH 4/5] ui-blame: add blame UI

2017-09-30 Thread John Keeping
t;whydo...@gmail.com> Reviewed-by: John Keeping <j...@keeping.me.uk> Linux's checkpatch.pl has a few minor complaints if you're re-rolling, but I don't think these need to block merging: WARNING: line over 80 characters #174: FILE: ui-blame.c:17: +static char *emit_one_suspect_detail(

Re: [PATCH 1/5] html: html_ntxt with no ellipsis

2017-09-30 Thread John Keeping
On Wed, Sep 27, 2017 at 05:43:27PM -0500, Jeff Smith wrote: > For implementing a ui-blame page, there is need for a function that > outputs a selection from a block of text, transformed for HTML output, > but with no further modifications or additions. > > Signed-off-by: Jeff Smith

Re: [PATCH 2/5] ui-tree: move set_title_from_path to ui-shared

2017-09-30 Thread John Keeping
On Wed, Sep 27, 2017 at 05:43:28PM -0500, Jeff Smith wrote: > The ui-blame code will also need to call set_title_from_path, so go > ahead and move it to ui-shared. > > Signed-off-by: Jeff Smith > --- > ui-shared.c | 31 +++ > ui-shared.h | 2 ++ >

Re: [PATCH 0/5] Add ui-blame

2017-09-30 Thread John Keeping
On Wed, Sep 27, 2017 at 05:43:26PM -0500, Jeff Smith wrote: > I split git blame functionality into libgit, and the changes were > accepted upstream and are a part of git 2.14. Now that the git > infrastructure is in place, here is what is needed for cgit to make use > of it. > > Since RFCv2: > .

Re: cgit segfaults

2017-08-24 Thread John Keeping
On Thu, Aug 24, 2017 at 01:18:20AM -0500, Robby Workman wrote: > On Wed, 16 Aug 2017 09:36:28 +0100 > John Keeping <j...@keeping.me.uk> wrote: > > > On Wed, Aug 16, 2017 at 01:26:52AM -0500, Robby Workman wrote: > > > We're running cgit-1.1 with git-2.10.4 at >

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

2017-12-02 Thread John Keeping
On Wed, Nov 29, 2017 at 10:26:44PM +0100, Christian Hesse wrote: > From: Christian Hesse <m...@eworm.de> > > Update to git version v2.15.1: With commit 0abe14f6 prepare_packed_git() > moved to packfile.[ch]. > > Signed-off-by: Christian Hesse <m...@eworm.de>

Re: Commit _subject_ filter, everywhere

2017-12-02 Thread John Keeping
On Wed, Nov 29, 2017 at 10:10:00PM +0100, Bjjjrn Forsman wrote: > I got this idea to generate a link to the CI server job in front of > each commit message subject. Think small green/red boxes that are > clickable. I figure that getting the build status directly in cgit is > much more efficient

Re: [PATCH 4/4 v3] ui-blame: Allow syntax highlighting

2017-11-05 Thread John Keeping
On Sun, Oct 29, 2017 at 11:23:38PM +0100, Jason A. Donenfeld wrote: > Works remarkably well. Excellent work. Example, for others on the list: > > https://git.zx2c4.com/WireGuard/blame/src/noise.c > > Pending objections from others, I'll merge this from jd/color-blame to > master in a few days.

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

2017-11-05 Thread John Keeping
t think we can take a global decision on which behaviour is correct for all projects, so IMHO there must be a configuration switch to allow projects to decide what is right for them. > On 10/28/2017 07:36 AM, John Keeping wrote: > > On Tue, Oct 24, 2017 at 10:55:21AM -0400, Jason A. Smith wrote: &g

Re: Commit _subject_ filter, everywhere

2017-12-02 Thread John Keeping
On Sat, Dec 02, 2017 at 01:33:28PM +0100, Bjjjrn Forsman wrote: > On 2 December 2017 at 12:31, John Keeping <j...@keeping.me.uk> wrote: > > I was going to suggest introducing a new subject-filter which is used to > > filter the commit subject wherever it is displayed, but th

Re: Gerrit features and Docker based testing

2017-10-21 Thread John Keeping
On Thu, Oct 19, 2017 at 05:07:30PM -0600, bbuh...@codeaurora.org wrote: > Hi, Cgit is frequently paired with Gerrit installations, so I have a > some Gerrit integration features I'd like to contribute. One is a Lua > authentication filter for Gerrit. Background is that Gerrit allows > different >

Re: [PATCH 2/4] ui-blame: Break out emit_blame_entry into component methods

2017-10-21 Thread John Keeping
On Tue, Oct 17, 2017 at 11:17:33PM -0500, Jeff Smith wrote: > Signed-off-by: Jeff Smith <whydo...@gmail.com> Reviewed-by: John Keeping <j...@keeping.me.uk> > --- > ui-blame.c | 44 ++-- > 1 file changed, 30 insertions(+), 14 dele

Re: [PATCH 3/4] ui-blame: Make each column into a single table cell

2017-10-21 Thread John Keeping
On Tue, Oct 17, 2017 at 11:17:34PM -0500, Jeff Smith wrote: > Signed-off-by: Jeff Smith <whydo...@gmail.com> Reviewed-by: John Keeping <j...@keeping.me.uk> > --- > cgit.css | 19 +-- > ui-blame.c | 58 +

Re: [PATCH 4/4] ui-blame: Allow syntax highlighting

2017-10-21 Thread John Keeping
On Tue, Oct 17, 2017 at 11:17:35PM -0500, Jeff Smith wrote: > Place file contents into a single block so that syntax highlighting can > be applied in the usual fashion. Place the alternating color bars > behind the file contents. Force the default syntax highlighting > background to transparent.

Re: Rendering of README.md inline with inner tree view dirs

2018-06-11 Thread John Keeping
README.md as > >>>> github does. This is quite a small thing but very useful, eg > >>>> > >>>> https://github.com/warmcat/libwebsockets/tree/master/minimal-examples > >>>> > >>>> vs > >>>&g

Re: Rendering of README.md inline with inner tree view dirs

2018-06-12 Thread John Keeping
On Tue, Jun 12, 2018 at 05:27:09PM +0800, Andy Green wrote: > > > On June 12, 2018 5:24:37 PM GMT+08:00, John Keeping > wrote: > >On Tue, Jun 12, 2018 at 10:35:25AM +0200, Christian Hesse wrote: > >> Andy Green on Tue, 2018/06/12 13:53: > >> > 5) I get

Re: Rendering of README.md inline with inner tree view dirs

2018-06-12 Thread John Keeping
On Tue, Jun 12, 2018 at 10:35:25AM +0200, Christian Hesse wrote: > Andy Green on Tue, 2018/06/12 13:53: > > 5) I get some gcc 8.1 warnings, I made a couple of patches to get around > > them. In a couple of places, the code seemed legit really. > > I do see these on Arch as well. :) > Did not

Re: Rendering of README.md inline with inner tree view dirs

2018-06-12 Thread John Keeping
On Tue, Jun 12, 2018 at 01:53:27PM +0800, Andy Green wrote: > On 06/11/2018 11:38 PM, John Keeping wrote: > > On Mon, Jun 11, 2018 at 04:05:38PM +0800, Andy Green wrote: > > >> I think what github did comes into its own when you are in the mode of > >> comi

Re: Custom snapshot prefix & Snapshot signatures

2018-06-07 Thread John Keeping
gree with Konstantin, though: Binary compressed data may change over > time with more recent algorithms. So I will reply with an extra patch that > allows to push tar signatures to git notes that can be downloaded for > compressed tar snapshots. > > Custom snapshot prefix [0]:

Re: [PATCH 1/1] snapshot: support tar signature for compressed tar

2018-06-07 Thread John Keeping
On Thu, Jun 07, 2018 at 02:15:34PM +0200, Christian Hesse wrote: > From: Christian Hesse > > This adds support for kernel.org style signatures where the uncompressed > tar archive is signed and compressed later. The signature is valid for > all tar* snapshots. > > Signed-off-by: Christian Hesse

Re: [PATCH v2 2/2] snapshot: support tar signature for compressed tar

2018-06-07 Thread John Keeping
On Thu, Jun 07, 2018 at 05:14:52PM +0200, Christian Hesse wrote: > From: Christian Hesse > > This adds support for kernel.org style signatures where the uncompressed > tar archive is signed and compressed later. The signature is valid for > all tar* snapshots. > > We have a filter which

Re: [PATCH v2 14/15] md2html-add-asset-postfix-arg

2018-06-18 Thread John Keeping
On Mon, Jun 18, 2018 at 10:58:26AM +0800, Andy Green wrote: > Extend md2html with a third argument for URL postfix, like "?h=mybranch" > > Signed-off-by: Andy Green > --- > filters/html-converters/md2html | 17 +++-- > 1 file changed, 11 insertions(+), 6 deletions(-) > > diff

Re: [PATCH v2 15/15] render: adapt for providing extra filter args for plain

2018-06-18 Thread John Keeping
On Mon, Jun 18, 2018 at 10:58:31AM +0800, Andy Green wrote: > This changes the render filter exec part to provide a second > and third argument, which are used by md2html to fix up the url > path for "plain" for the repo, eg, "/cgit/plain/" and > "?h=mybranch", as required by the modifications to

Re: [PATCH v2 11/15] config: add repo inline-readme list

2018-06-18 Thread John Keeping
but other than that this looks good. Reviewed-by: John Keeping > --- > cgit.c |6 ++ > cgit.h |1 + > cgitrc.5.txt | 10 ++ > shared.c |2 ++ > 4 files changed, 19 insertions(+) > > diff --git a/cgit.c b/cgit.c > index 4ffd

Re: [PATCH v2 10/15] config: add global inline-readme list

2018-06-18 Thread John Keeping
On Mon, Jun 18, 2018 at 10:58:05AM +0800, Andy Green wrote: > Allows the user to specify a list of filenames that should be > rendered inline with tree view, if present in the directory. > > Signed-off-by: Andy Green > --- > diff --git a/cgitrc.5.txt b/cgitrc.5.txt > index a1560eb..37858af

Re: [PATCH v2 12/15] ui-tree: render any matching README file in tree view

2018-06-18 Thread John Keeping
me files rendering them inline. > > Signed-off-by: Andy Green A couple of minor style points below, but this looks good. With or without the style changes: Reviewed-by: John Keeping > --- > ui-tree.c | 60 +++- > 1

Re: [PATCH v2] blame: css: make blame highlight div absolute and top left

2018-06-18 Thread John Keeping
On Mon, Jun 18, 2018 at 02:02:54PM +0800, Andy Green wrote: > Normal operation of blame view requires div.highlight to > have absolute position and set to its parent's top left > for me. > > Otherwise the grey background boxes indicating the extent of > the patch in the lines td displace the

Re: [PATCH 1/1] global: remove functionality we deprecated for cgit v1.0

2018-06-18 Thread John Keeping
On Mon, Jun 18, 2018 at 11:51:41AM +0200, Christian Hesse wrote: > From: Christian Hesse > > The man page states these were deprecated for v1.0. We are past v1.1, > so remove the functionality. > > Signed-off-by: Christian Hesse Reviewed-by: John Keeping > ---

Re: [PATCH v2 04/15] Add source page

2018-06-18 Thread John Keeping
On Mon, Jun 18, 2018 at 10:57:35AM +0800, Andy Green wrote: > From: John Keeping > > We are about to introduce rendering of content for the tree view. This > source page will allow bypassing the renderer and accessing the content > of the current tree view. > > Signed

[PATCH 2/2] shared: use strbuf for expanding macros

2018-06-16 Thread John Keeping
Avoid a fixed size buffer by using struct strbuf to build the expanded value. Signed-off-by: John Keeping --- shared.c | 73 +--- 1 file changed, 27 insertions(+), 46 deletions(-) diff --git a/shared.c b/shared.c index 32d0f46..6ce3990 100644

[PATCH 1/2] shared: allocate return value from expand_macros()

2018-06-16 Thread John Keeping
In preparation for switching the implementation of expand_macros away from a static buffer, return an allocated buffer and update all callers to release it. Signed-off-by: John Keeping --- cgit.c | 33 +++-- shared.c| 5 ++--- ui-shared.c | 9 ++--- 3

Re: [PATCH 07/11] ui-blame: free read_sha1_file() buffer after use

2018-06-16 Thread John Keeping
On Wed, Jun 13, 2018 at 10:02:05AM +0800, Andy Green wrote: > Signed-off-by: Andy Green > --- > ui-blame.c |3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/ui-blame.c b/ui-blame.c > index 17e2d60..a5c7d69 100644 > --- a/ui-blame.c > +++ b/ui-blame.c > @@ -206,6 +206,9 @@ static

Re: [PATCH 2/2] gcc8.1: fix strcat warning

2018-06-16 Thread John Keeping
; > Make the code do the padding explicitly. > > Signed-off-by: Andy Green Reviewed-by: John Keeping > --- > ui-ssdiff.c | 12 ++-- > 1 file changed, 10 insertions(+), 2 deletions(-) > > diff --git a/ui-ssdiff.c b/ui-ssdiff.c > index 7f261ed..e520b95 10064

Re: [RFC PATCH] Makefile: work around parallel make issues in docs

2018-06-16 Thread John Keeping
On Sat, Jun 16, 2018 at 01:38:31AM -0400, Todd Zullinger wrote: > When make is run with multiple jobs, doc-man and doc-html fail. The a2x > command tries to write %.5.xml for each invocation, overwriting each > other. > > Work around this by copying %.5 to %.5+ in doc-man. This is a rather >

Re: [PATCH 1/2] gcc8.1: fix strncpy bounds warnings

2018-06-16 Thread John Keeping
On Sat, Jun 16, 2018 at 09:12:08PM +0800, Andy Green wrote: > > > On June 16, 2018 9:04:48 PM GMT+08:00, John Keeping > wrote: > >On Wed, Jun 13, 2018 at 07:33:59AM +0800, Andy Green wrote: > >> These warnings are coming on default Fedora 28 build and proba

Re: [PATCH 1/2] gcc8.1: fix strncpy bounds warnings

2018-06-16 Thread John Keeping
On Wed, Jun 13, 2018 at 07:33:59AM +0800, Andy Green wrote: > These warnings are coming on default Fedora 28 build and probably others > using gcc 8.1 > > ../shared.c: In function ‘expand_macro’: > ../shared.c:483:3: warning: ‘strncpy’ specified bound depends on the length > of the source

Re: [PATCH 06/11] ui-tree: free read_sha1_file() buffer after use

2018-06-16 Thread John Keeping
On Wed, Jun 13, 2018 at 10:02:00AM +0800, Andy Green wrote: > Free up the buffer allocated in read_sha1_file() > > Signed-off-by: Andy Green Reviewed-by: John Keeping I've extracted this from the series and pushed it on my for-jason branch: https://git.zx2c4.com/cgit/log/?h=jk/

Re: Rendering of README.md inline with inner tree view dirs

2018-06-16 Thread John Keeping
On Wed, Jun 13, 2018 at 09:47:38AM +0800, Andy Green wrote: > > > On 06/12/2018 05:31 PM, John Keeping wrote: > > On Tue, Jun 12, 2018 at 01:53:27PM +0800, Andy Green wrote: > >> On 06/11/2018 11:38 PM, John Keeping wrote: > >>> On Mon, Jun 11, 2018 a

Re: [PATCH 05/11] ui-tree: use render fileters to display content

2018-06-16 Thread John Keeping
If you're including these patches in your series, please fix my typo in the subject ("fileters" has a stray 'e') :-) On Wed, Jun 13, 2018 at 10:01:55AM +0800, Andy Green wrote: > From: John Keeping > > This allows applying filters to files in the repository, for example t

Re: [PATCH 00/11] Render READMEs inline in tree view

2018-06-16 Thread John Keeping
On Thu, Jun 14, 2018 at 11:47:41AM +0800, Andy Green wrote: > On 06/13/2018 10:01 AM, Andy Green wrote: > > The following series adds config to allow rendering of > > selected READMEs inline after the tree view, where > > present in the directory being viewed. > > > > It builds on John Keeping's

Re: [PATCH] Encode value and field before calculating cookie digest, the same way secure_value() does

2018-06-16 Thread John Keeping
On Thu, Apr 12, 2018 at 08:54:31PM +0300, thev...@gmail.com wrote: > From: Vlad Safronov > > Bugfix: Encode value and field before calculating cookie digest, the same way > as secure_value() does > so validating will work correctly on encoded values. Missing sign-off (see [1] for what this

Re: Rendering of README.md inline with inner tree view dirs

2018-06-16 Thread John Keeping
On Sat, Jun 16, 2018 at 03:12:09PM +0100, John Keeping wrote: > > >> 3) You can see on the top level of the tree, the README.md references > > >> > > >> > > >> > > >> This url format works in github. In the cgit About view, this re

Re: [PATCH 1/1] snapshot: support special value 'all' to enable all formats

2018-06-16 Thread John Keeping
On Thu, Jun 07, 2018 at 10:05:50PM +0200, Christian Hesse wrote: > From: Christian Hesse > > Signed-off-by: Christian Hesse Reviewed-by: John Keeping > --- > cgitrc.5.txt | 1 + > shared.c | 3 +++ > 2 files changed, 4 insertions(+) > > diff --git a/cgitrc.5

Re: [PATCH] ui-tag: Fix inconsistent capitalization

2018-06-16 Thread John Keeping
On Sun, Jun 10, 2018 at 06:28:49PM -0400, Jon DeVree wrote: > Way back in 2009 all of these were lower cased except this one > occurrence. > > Signed-off-by: Jon DeVree Thanks! I've picked this up in jk/for-jason. > --- > ui-tag.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >

Re: Bug: cgit shows empty pages, when viewing Tag-Only-Repo

2018-06-16 Thread John Keeping
newest tag as the default head [1]. This is a separate pass because we want to prefer branches if there are any. [1] In fact, we allow any ref at this point because we want to avoid falsely claiming that the repository is empty when it isn't. Signed-off-by: John Keeping --- cgit.c | 46

Re: Adding short commit id to repo Log tab

2018-06-16 Thread John Keeping
Sorry for the delay responding. On Wed, Apr 11, 2018 at 12:00:28PM +0300, Vlad wrote: > I think adding short (7 chars) commit id to repository Log tab output > might be more useful than file or line count.. > > I have examined the code, it it not easy to add an extra column > to the output. > >

Re: Translation

2018-06-16 Thread John Keeping
On Mon, Jun 04, 2018 at 10:24:24AM +0200, Malte Kiefer wrote: > first of all I want to say thank you for this amazing software. > I start to using it, and I really like it. > > Then I wanted to inquire with you if you think about offering cgit in > multiple languages? > I would like to translate

Re: [PATCH 10/11] config: add tree-readme list

2018-06-16 Thread John Keeping
On Wed, Jun 13, 2018 at 10:02:20AM +0800, Andy Green wrote: > Allows the user to specify a list of filenames that should be > rendered inline with tree view, if present in the directory. > > Signed-off-by: Andy Green As mentioned in reply to the cover leter, I think this needs to be a repo

Re: cache-size implementation downsides

2018-06-16 Thread John Keeping
orary stdout FD into struct cache_slot. Signed-off-by: John Keeping --- cache.c | 37 ++--- 1 file changed, 14 insertions(+), 23 deletions(-) diff --git a/cache.c b/cache.c index 0901e6e..2c70be7 100644 --- a/cache.c +++ b/cache.c @@ -29,6 +29,7 @@ struct cache_s

Re: [PATCH] expand environmentvariables in root-title and root-descr

2018-06-16 Thread John Keeping
On Thu, Apr 12, 2018 at 11:19:12AM +0200, b.laes...@pengutronix.de wrote: > From: Björn Lässig > > For having personanlized cgit configuration i need to use > > root-desc=$REMOTE_USER@$HTTP_HOST Missing sign-off (see [1] for what this means). Also, this needs a corresponding change in

Re: [RFC PATCH] Makefile: work around parallel make issues in docs

2018-06-16 Thread John Keeping
Hi Todd, On Sat, Jun 16, 2018 at 12:32:06PM -0400, Todd Zullinger wrote: > John Keeping wrote: > > How about the patch below instead? It's a bigger change to the output > > format for HTML, but as a side effect it fixes the parallel build. > > It does, but only if the tar

Re: [PATCH 09/11] ui-tree: ls_tail: add walk table param

2018-06-16 Thread John Keeping
On Wed, Jun 13, 2018 at 10:02:15AM +0800, Andy Green wrote: > Arrange that walk_tree_ctx is available in ls_tail, we > will make use of it shortly. > > Signed-off-by: Andy Green Reviewed-by: John Keeping > --- > ui-tree.c |6 +++--- > 1 file changed, 3 inser

Re: [PATCH 08/11] ui-tree: print_object: add is_inline param

2018-06-16 Thread John Keeping
On Wed, Jun 13, 2018 at 10:02:10AM +0800, Andy Green wrote: > We will reuse print_object to render things inline shortly. > > Add a parameter that lets us adapt its behaviour slightly > for that case. > > Signed-off-by: Andy Green > --- > ui-tree.c |7 --- > 1 file changed, 4

Re: [PATCH 1/1] RFC: git: update to v2.18.0-rc2

2018-06-16 Thread John Keeping
int_dir_entry > print_object > single_tree_cb > walk_tree > write_tree_link > > And finally we use new upstream functions that were added for > struct object_id: > > hashcpy -> oidcpy > sha1_to_hex -> oid_to_hex > > Signed-off-by: Christian Hesse With

[PATCH] cgitrc.5: fix auth filter return value documentation

2018-06-16 Thread John Keeping
We don't treat all return values as invalid! Signed-off-by: John Keeping --- cgitrc.5.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cgitrc.5.txt b/cgitrc.5.txt index 4da166c..3e53bbd 100644 --- a/cgitrc.5.txt +++ b/cgitrc.5.txt @@ -715,7 +715,7 @@ auth filter

Re: [PATCH] Update COPYING

2018-06-17 Thread John Keeping
ly non-whitespace changes are the updated FSF address and two > references to the L in LGPL changed from Library to Lesser. > > ¹ https://www.gnu.org/licenses/old-licenses/gpl-2.0.txt Missing sign-off. Acked-by: John Keeping > --- > This will help users & distributors who

Re: [PATCH v3 17/17] render: adapt for providing extra filter args for plain

2018-06-19 Thread John Keeping
; "/cgit/plain/doc-assets/overview.png?h=mybranch" > > If the same document is viewed from a different rev in cgit, the > processed markdown url will change to match the cgit context, even > though the markdown relative URL is the same for all versions. > > Signed-

Re: cache-size implementation downsides

2018-06-19 Thread John Keeping
On Sat, Jun 16, 2018 at 04:46:21PM +0100, John Keeping wrote: > On Wed, Jun 13, 2018 at 03:02:42PM -0400, Konstantin Ryabitsev wrote: > > 2. I have witnessed cache corruption due to collisions (which is > > a bug in itself). One of our frontends was hit by a lot of agressi

Re: [PATCH v2 12/15] ui-tree: render any matching README file in tree view

2018-06-19 Thread John Keeping
On Tue, Jun 19, 2018 at 09:55:18AM +0800, Andy Green wrote: > > > On 06/19/2018 03:36 AM, John Keeping wrote: > > On Mon, Jun 18, 2018 at 10:58:15AM +0800, Andy Green wrote: > >> While listing the items in tree view, we collect a list > >> of any filenames that m

<    1   2   3   4   5   >