[PATCH] css: blame: reset font size for oid

2022-02-13 Thread John Keeping
In Firefox, the hashes in the blame UI are out of step with the line number and content leading to ever increasing vertical misalignment. This is caused by the .oid class setting font-size to 90%, so override this back to 100% for the blame case, bringing the height of lines in all three columns

[PATCH] blame: add a link to the parent commit

2022-02-13 Thread John Keeping
suspect->commit->parents) { + struct commit *parent = suspect->commit->parents->item; + + html(" "); + cgit_blame_link("^", "Blame the previous revision", NULL, + ctx.qry.head, o

blame: View blame prior to a change

2022-01-15 Thread Alejandro Colomar (man-pages)
Hi, I'd like to propose a feature (maybe it has already been proposed) regarding the blame. Github has a very nice feature (IMHO), that allows you to easily jump from the current blame, to a blame of a previous version of the file. It's a link called "View blame prior to this change".

[PATCH 2/2] ui-tree: don't link to blame for binary blobs

2019-12-18 Thread C. McEnroe
("blob: %s (", oid_to_hex(oid)); cgit_plain_link("plain", NULL, NULL, ctx.qry.head, rev, path); - if (ctx.repo->enable_blame) { + if (ctx.repo->enable_blame && !is_binary) { html(") (");

[PATCH 1/1] ui-tree: allow per repository override for enable-blame

2019-02-26 Thread Christian Hesse
From: Christian Hesse The blame operation can cause high cost in terms of CPU load for huge repositories. Let's add a per repository override for enable-blame. Signed-off-by: Christian Hesse --- cgit.c | 4 cgit.h | 1 + cgitrc.5.txt | 4 cmd.c| 2 +- shared.c

[PATCH v2 5/5] ui-blame: use the line range highlight script

2018-06-21 Thread Andy Green
This allows it to work on /blame/ URLs. Blame has an extra layer of parent elements which has to be taken into account by the JS when finding the highlight width, hence the 1 arg to the emit function. Signed-off-by: Andy Green --- ui-blame.c |1 + 1 file changed, 1 insertion(+) diff --git

[PATCH 3/3] ui-blame: use the line range highlight script

2018-06-20 Thread Andy Green
This allows it to work on /blame/ URLs. Blame has an extra layer of parent elements which has to be taken into account by the JS when finding the highlight width, hence the 1 arg to the emit function. Signed-off-by: Andy Green --- ui-blame.c |1 + 1 file changed, 1 insertion(+) diff --git

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

2018-06-19 Thread Andy Green
On 06/20/2018 03:59 AM, John Keeping wrote: On Tue, Jun 19, 2018 at 03:11:52AM +0800, Andy Green wrote: On June 19, 2018 2:57:47 AM GMT+08:00, John Keeping wrote: On Mon, Jun 18, 2018 at 02:02:54PM +0800, Andy Green wrote: Normal operation of blame view requires div.highlight to have

Re: [PATCH v3 08/17] ui-blame: free read_sha1_file() buffer after use

2018-06-19 Thread John Keeping
On Tue, Jun 19, 2018 at 05:02:07PM +0800, Andy Green wrote: > Signed-off-by: Andy Green Pushed to jk/for-jason (after rebasing onto master). > --- > ui-blame.c |5 - > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/ui-blame.c b/ui-blame.c > index 8b56554..37e2c68

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

2018-06-19 Thread John Keeping
On Tue, Jun 19, 2018 at 03:11:52AM +0800, Andy Green wrote: > On June 19, 2018 2:57:47 AM GMT+08:00, John Keeping > wrote: > >On Mon, Jun 18, 2018 at 02:02:54PM +0800, Andy Green wrote: > >> Normal operation of blame view requires div.highlight to > >> have ab

[PATCH v3 08/17] ui-blame: free read_sha1_file() buffer after use

2018-06-19 Thread Andy Green
Signed-off-by: Andy Green --- ui-blame.c |5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ui-blame.c b/ui-blame.c index 8b56554..37e2c68 100644 --- a/ui-blame.c +++ b/ui-blame.c @@ -154,7 +154,7 @@ static void print_object(const struct object_id *oid, const char *path,

[PATCH v3 02/17] blame: css: make blame highlight div absolute and at parent top

2018-06-19 Thread Andy Green
Normal operation of blame view requires div.highlight to have absolute position and set to its parent's top for me. Otherwise the grey background boxes indicating the extent of the patch in the lines td displace the highlit sources, they start at the bottom of the td. This patch makes the blame

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

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

2018-06-18 Thread Andy Green
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 highlit sources, they start at the bottom of the td. This patch makes

[PATCH v2 08/15] ui-blame: free read_sha1_file() buffer after use

2018-06-17 Thread Andy Green
Signed-off-by: Andy Green --- ui-blame.c |6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ui-blame.c b/ui-blame.c index daa7e2b..6e23f0b 100644 --- a/ui-blame.c +++ b/ui-blame.c @@ -154,7 +154,7 @@ static void print_object(const struct object_id *oid, const char

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

2018-06-16 Thread Andy Green
On 06/16/2018 10:23 PM, John Keeping wrote: 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 +++

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

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

2018-06-12 Thread Andy Green
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 void print_object(const unsigned char *sha1, const char *path, } else {

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

2018-01-19 Thread Jason A. Donenfeld
This patchset has been merged to master. Thanks for your contribution! Jason ___ CGit mailing list CGit@lists.zx2c4.com https://lists.zx2c4.com/mailman/listinfo/cgit

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

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

2017-10-29 Thread Jason A. Donenfeld
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. Thanks for this series! Jason

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

2017-10-28 Thread Jeff Smith
) { + cgit_print_error_page(500, "Internal server error", + "Error reading object %s", sha1_to_hex(sha1)); + return; + } + argv_array_push(_argv, "blame"); argv_array_push(_argv, rev); init_revisions(,

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

2017-10-28 Thread Jeffrey Smith
ev_argv = ARGV_ARRAY_INIT; > struct rev_info revs; > @@ -102,6 +117,13 @@ static void print_object(const unsigned char *sha1, > const char *path, > return; > } > > + buf = read_sha1_file(sha1, , ); > + if (!buf) { >

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

2017-10-28 Thread Jeff Smith
rror", + "Error reading object %s", sha1_to_hex(sha1)); + return; + } + argv_array_push(_argv, "blame"); argv_array_push(_argv, rev); init_revisions(, NULL); @@ -157,20 +179,37 @@ static void print_object(con

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

2017-10-24 Thread Jason A. Donenfeld
Just waiting on resubmission of this 4/4, then. I'll put 1-3 in a branch. Jason ___ CGit mailing list CGit@lists.zx2c4.com https://lists.zx2c4.com/mailman/listinfo/cgit

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

2017-10-21 Thread Jeffrey Smith
On Sat, Oct 21, 2017 at 9:43 AM, John Keeping wrote: > > This doesn't account for tabs, which is noticable in long lines (I > happened to test with cgit.c where line 615 is quite a bit longer than > average). > > It is fixed by using: > > const char *start =

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

2017-10-21 Thread John Keeping
char *path, >const char *basename, const char *rev) > { > enum object_type type; > + char *buf; > unsigned long size; > struct argv_array rev_argv = ARGV_ARRAY_INIT; > struct rev_info revs; > @@ -102,6 +109,13 @@ static void print_object

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 Reviewed-by: John Keeping > --- > cgit.css | 19 +-- > ui-blame.c | 58 +- > 2 files

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 Reviewed-by: John Keeping > --- > ui-blame.c | 44 ++-- > 1 file changed, 30 insertions(+), 14 deletions(-) > > diff --git

[PATCH 1/4] ui-blame: Distinguish hashes column from lines column

2017-10-17 Thread Jeff Smith
Signed-off-by: Jeff Smith --- cgit.css | 1 + ui-blame.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/cgit.css b/cgit.css index 836f8ae..893ebeb 100644 --- a/cgit.css +++ b/cgit.css @@ -300,6 +300,7 @@ div#cgit table.blob { border-top: solid

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

2017-10-17 Thread Jeff Smith
ternal server error", + "Error reading object %s", sha1_to_hex(sha1)); + return; + } + argv_array_push(_argv, "blame"); argv_array_push(_argv, rev); init_revisions(, NULL); @@ -157,20 +171,37 @@ sta

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

2017-10-17 Thread Jeff Smith
Signed-off-by: Jeff Smith --- cgit.css | 19 +-- ui-blame.c | 58 +- 2 files changed, 54 insertions(+), 23 deletions(-) diff --git a/cgit.css b/cgit.css index 893ebeb..20b7e86 100644 --- a/cgit.css +++

[PATCH 0/4] Add ui-blame syntax highlighting

2017-10-17 Thread Jeff Smith
I reorganized the ordering of the table so that the lines of the file are contained within a single cell, and the base layer of that cell contains the alternating colors. I then pass the full contents of the file through the source filter. Jeff Smith (4): ui-blame: Distinguish hashes column

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

2017-10-17 Thread Jeff Smith
Signed-off-by: Jeff Smith --- ui-blame.c | 44 ++-- 1 file changed, 30 insertions(+), 14 deletions(-) diff --git a/ui-blame.c b/ui-blame.c index a5ac590..9b84147 100644 --- a/ui-blame.c +++ b/ui-blame.c @@ -41,36 +41,52 @@ static char

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

2017-10-15 Thread Jason A. Donenfeld
Hi Jeff, Oh, cool. What's your idea for accomplishing that? Planning on putting it through the filter, buffering it, and then spitting it back out in equal sized chunks, hoping the filter doesn't add extra new lines? Jason ___ CGit mailing list

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

2017-10-15 Thread Jeffrey Smith
That seems like it could be valuable work, but FWIW I have been working on a different solution to adding syntax highlighting to the blame page. I hope to have it ready (at least a prototype) in the next day or two. On Oct 15, 2017 11:47 AM, "Jason A. Donenfeld" <ja...@zx2c4.com>

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

2017-10-15 Thread Jason A. Donenfeld
Right, we may very well need a more capable model. One approach would be to get rid of all the exec stuff, and instead have plugins, that can register themselves in all sorts of places. A plugin would define a series of hooks and filters, which would be directly called at the right time. We'd

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

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

2017-10-14 Thread Jason A. Donenfeld
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 has some ideas on how we might enact a flush operation, please pipe up (hah

[PATCH 4/4] ui-blame: put source lines through filter

2017-10-14 Thread Jason A. Donenfeld
We toggle the filter on and off so that the control table can avoid going through the filter. Signed-off-by: Jason A. Donenfeld --- ui-blame.c | 15 ++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/ui-blame.c b/ui-blame.c index 62cf431..71aec65

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

2017-10-03 Thread Jeffrey Smith
, Oct 3, 2017 at 1:36 PM, Jason A. Donenfeld <ja...@zx2c4.com> wrote: > Merged to master. Working quite nicely: > > https://git.zx2c4.com/cgit/blame/ui-shared.c > > Jeff -- do we want to be passing this through the source code filter >

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

2017-10-03 Thread Jason A. Donenfeld
Merged to master. Working quite nicely: https://git.zx2c4.com/cgit/blame/ui-shared.c Jeff -- do we want to be passing this through the source code filter to get highlighted lines? ___ CGit mailing list CGit@lists.zx2c4.com https://lists.zx2c4.com

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/5] Add ui-blame

2017-10-02 Thread Christian Hesse
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 > ssize_t slen = (ssize_t) len; > > Do I need to resend, or can someone fix

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

2017-10-02 Thread Jeffrey Smith
eview. > >> If you'd like to put this in a >> for-jason branch, I'll get to merging it soon. > > I pushed the latest version to ch/ui-blame. > -- > main(a){char*c=/*Schoene Gruesse */"B?IJj;MEH" > "CX:;",b;for(a/*

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

2017-10-01 Thread Christian Hesse
l get to merging it soon. I pushed the latest version to ch/ui-blame. -- main(a){char*c=/*Schoene Gruesse */"B?IJj;MEH" "CX:;",b;for(a/*Best regards my address:*/=0;b=c[a++];) putchar(b-1/(/*Chriscc -ox -xc -

[PATCHv2 4/5] ui-blame: add blame UI

2017-10-01 Thread Jeff Smith
Implement a page which provides the blame view of a specified file. This feature is controlled by a new config variable, "enable-blame", which is disabled by default. Signed-off-by: Jeff Smith <whydo...@gmail.com> --- cgit.c | 2 + cgit.css | 8 +++ cgit.h

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

2017-10-01 Thread Jeff Smith
Create links to the blame page. Signed-off-by: Jeff Smith <whydo...@gmail.com> --- ui-shared.c | 20 +--- ui-shared.h | 3 +++ ui-tree.c | 10 +- 3 files changed, 29 insertions(+), 4 deletions(-) diff --git a/ui-shared.c b/ui-shared.c index 315dedb..07c78a5

[PATCHv2 0/5] Add ui-blame

2017-10-01 Thread Jeff Smith
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 previous set: . Updated html_ntxt signature . set_title_from_path

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.

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

2017-09-27 Thread Jeff Smith
Create links to the blame page. Signed-off-by: Jeff Smith <whydo...@gmail.com> --- ui-shared.c | 20 +--- ui-shared.h | 3 +++ ui-tree.c | 10 +- 3 files changed, 29 insertions(+), 4 deletions(-) diff --git a/ui-shared.c b/ui-shared.c index ee96755..f75338a

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

2017-09-24 Thread Jeffrey Smith
eff 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 <whydo...@gmail.com> >> --- >> diff --git a/ui-blame.c b/ui-blame.c >> index 901ca89..cc4457a 1

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

2017-09-23 Thread Jeffrey Smith
Yes, it is identical. I will look at extracting to ui-shared.c as you suggest. On Sat, Sep 23, 2017 at 10:47 AM, John Keeping <j...@keeping.me.uk> wrote: > On Fri, Sep 22, 2017 at 10:38:43PM -0500, Jeff Smith wrote: >> Create framework for a page that will contain the 'bl

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

2017-09-23 Thread Jeffrey Smith
I will start re-arranging the patches to follow your suggestion. On Sat, Sep 23, 2017 at 10:53 AM, John Keeping <j...@keeping.me.uk> wrote: > On Fri, Sep 22, 2017 at 10:38:41PM -0500, Jeff Smith wrote: >> I split git blame functionality into libgit, and the changes were >&

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 <whydo...@gmail.com> > --- > diff --git a/ui-blame.c b/ui-blame.c > in

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

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 <whydo...@gmail.com> > --

[RFCv2 PATCH 6/7] ui-blame: begin building

2017-09-22 Thread Jeff Smith
Signed-off-by: Jeff Smith --- cgit.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/cgit.mk b/cgit.mk index 90a2346..3fcc1ca 100644 --- a/cgit.mk +++ b/cgit.mk @@ -77,6 +77,7 @@ CGIT_OBJ_NAMES += parsing.o CGIT_OBJ_NAMES += scan-tree.o CGIT_OBJ_NAMES += shared.o

[RFCv2 PATCH 7/7] ui-blame: generate blame page when requested

2017-09-22 Thread Jeff Smith
d) +{ + if (ctx.cfg.enable_blame) + cgit_print_blame(); + else + cgit_print_error_page(403, "Forbidden", "Blame is disabled"); +} + static void blob_fn(void) { cgit_print_blob(ctx.qry.sha1, ctx.qry.path, ctx.qry.head, 0); @@ -164,6 +173,7

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

2017-09-22 Thread Jeff Smith
Use the blame interface added in libgit to output the blame information of a file in the repository. Signed-off-by: Jeff Smith <whydo...@gmail.com> --- cgit.css | 8 +++ ui-blame.c | 210 - 2 files changed, 216 insertions

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

2017-09-22 Thread Jeff Smith
Create links to the blame page. Signed-off-by: Jeff Smith <whydo...@gmail.com> --- ui-shared.c | 20 +--- ui-shared.h | 3 +++ ui-tree.c | 10 +- 3 files changed, 29 insertions(+), 4 deletions(-) diff --git a/ui-shared.c b/ui-shared.c index e5c9a02..faa0d6a

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

2017-09-22 Thread Jeff Smith
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 <whydo...@gmail.com> --- html.c

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

2017-09-22 Thread Jeff Smith
Create framework for a page that will contain the 'blame' for a file in the repository. Signed-off-by: Jeff Smith <whydo...@gmail.com> --- ui-blame.c | 160 + ui-blame.h | 7 +++ 2 files changed, 167 insertions(+) create mode

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

2017-09-22 Thread Jeff Smith
*name, const char *value) ctx.cfg.enable_tree_linenumbers = atoi(value); else if (!strcmp(name, "enable-git-config")) ctx.cfg.enable_git_config = atoi(value); + else if (!strcmp(name, "enable-blame")) + ctx.cfg

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

2017-08-31 Thread Jeffrey Smith
and integrating some >> of the suggestions made thus far. Blame is certainly a more expensive >> operation, and adding a flag for it makes a lot of sense. I will look into >> it further. > > I rebased the original code on current master. > > Any news on an updated set of

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

2017-08-24 Thread Christian Hesse
Jeffrey Smith <whydo...@gmail.com> on Fri, 2017/08/04 19:57: > I am working at rebasing my changes onto git 2.14-rc1 and integrating some > of the suggestions made thus far. Blame is certainly a more expensive > operation, and adding a flag for it makes a lot of sen

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

2017-08-04 Thread Jeffrey Smith
I am working at rebasing my changes onto git 2.14-rc1 and integrating some of the suggestions made thus far. Blame is certainly a more expensive operation, and adding a flag for it makes a lot of sense. I will look into it further. - Jeff On Aug 4, 2017 7:23 PM, "Daniel Campbell"

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

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 <whydo...@gmail.com> > --- > cgit.css | 8

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

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 <whydo...@gmail.com> > --- > cgit.mk | 1 + > cmd.c |

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

2017-07-05 Thread Christian Hesse
Jeff Smith on Wed, 2017/06/07 21:18: > +div#cgit table.blame tr:nth-child(even) { > + background: #f7f0e7; > +} We do not use this color for anything, no? Any reason not to use a color that is used elsewhere, for example #f7f7f7? -- main(a){char*c=/*Schoene Gruesse

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

2017-06-08 Thread Christian Hesse
Jeff Smith <whydo...@gmail.com> on Wed, 2017/06/07 21:18: > 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 ad

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

2017-06-07 Thread Jeff Smith
Use the blame interface added in libgit to output the blame information of a file in the repository. Signed-off-by: Jeff Smith <whydo...@gmail.com> --- cgit.css | 8 +++ ui-blame.c | 214 - 2 files changed, 220 insertions

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

2017-06-07 Thread Jeff Smith
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 <whydo...@gmail.com> --- html.c | 37 -

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

2017-06-07 Thread Jeff Smith
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 <whydo...@gmail.com> --- cgit.mk | 1 + cmd.c | 8 ++- ui-blame.c | 160 ui-b

[RFC PATCH 0/4] Add ui-blame

2017-06-07 Thread Jeff Smith
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 master (which should be future v2.14), and makes changes made

Re: Blame

2017-04-19 Thread Jason A. Donenfeld
Hey Jeff, If option 1 can be done cleanly enough, that'd be fine with me. Jason ___ CGit mailing list CGit@lists.zx2c4.com https://lists.zx2c4.com/mailman/listinfo/cgit

Re: [PATCH 0/3] Blame UI

2015-08-12 Thread Jason A. Donenfeld
Relying on an installed git does impose an additional deployment requirement we didn't have before. Previously git was just required for running the tests (developers), but not for deployment. I'll wait to receive some other opinions on the topic of relying on having the executables around.

Re: [PATCH 0/3] Blame UI

2015-08-12 Thread Jason A. Donenfeld
On Wed, Aug 12, 2015 at 3:03 PM, John Keeping j...@keeping.me.uk wrote: This is an attempt at adding blame support to CGit. Because git.git doesn't include the blame implementation in libgit.a, I decided to simply invoke git-blame(1) and parse its porcelain output. Could you possibly just do

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

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

[PATCH 0/3] Blame UI

2015-08-12 Thread John Keeping
This is an attempt at adding blame support to CGit. Because git.git doesn't include the blame implementation in libgit.a, I decided to simply invoke git-blame(1) and parse its porcelain output. I don't think the result is too hideous (although I do perhaps need to extract some helper functions

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

2015-08-12 Thread John Keeping
(, sha1_to_hex(sha1)); cgit_plain_link(plain, NULL, NULL, ctx.qry.head, rev, path); + if (ctx.cfg.enable_blame) { + html( | ); + cgit_blame_link(blame, NULL, NULL, ctx.qry.head, + rev, path, -1

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