List for cgit developers and users
 help / color / mirror / Atom feed
* commit-filter not being applied on log page
@ 2014-07-31 14:27 chris.burroughs
  2014-08-01  9:44 ` john
  0 siblings, 1 reply; 5+ messages in thread
From: chris.burroughs @ 2014-07-31 14:27 UTC (permalink / raw)


I'm trying to write a commit-filter to hyperlink references to our bug 
tracker.  It seems to work fine for commit detailed pages, but not at 
all for the log view.  Since our developers often make brief messages 
like "fixes #123' so getting the url in the log view is arguably more 
useful than in the detail page.

For example if there was a hypothetical filter that turned v1.2.3 into 
<a href="http://example.org/v1.2.3">v1.2.3</a> it would work on 
http://git.zx2c4.com/cgit/commit/?id=865afe0eb1b5e6485fe0f65472e6635266e393b1 
but not http://git.zx2c4.com/cgit/log/ or 
http://git.zx2c4.com/cgit/log/?showmsg=1



^ permalink raw reply	[flat|nested] 5+ messages in thread

* commit-filter not being applied on log page
  2014-07-31 14:27 commit-filter not being applied on log page chris.burroughs
@ 2014-08-01  9:44 ` john
  2014-08-01 18:06   ` chris.burroughs
  2015-01-05 19:03   ` chris.burroughs
  0 siblings, 2 replies; 5+ messages in thread
From: john @ 2014-08-01  9:44 UTC (permalink / raw)


On Thu, Jul 31, 2014 at 10:27:19AM -0400, Chris Burroughs wrote:
> I'm trying to write a commit-filter to hyperlink references to our bug 
> tracker.  It seems to work fine for commit detailed pages, but not at 
> all for the log view.  Since our developers often make brief messages 
> like "fixes #123' so getting the url in the log view is arguably more 
> useful than in the detail page.

I think this is an issue of the cost of forking a filter process for
each line in the log view.  Now that we have Lua filters that may not be
so much of an issue, but I don't think we can just start using the
source filter on the log view due to the impact that will have on people
with an "exec" source-filter already configured.

Perhaps we need to add a "log-filter" which you could configure to be
the same as "source-filter" but which can be left blank for people whose
links are normally in the body of the commit message.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* commit-filter not being applied on log page
  2014-08-01  9:44 ` john
@ 2014-08-01 18:06   ` chris.burroughs
  2014-12-24  2:03     ` Jason
  2015-01-05 19:03   ` chris.burroughs
  1 sibling, 1 reply; 5+ messages in thread
From: chris.burroughs @ 2014-08-01 18:06 UTC (permalink / raw)


On 08/01/2014 05:44 AM, John Keeping wrote:
> On Thu, Jul 31, 2014 at 10:27:19AM -0400, Chris Burroughs wrote:
>> I'm trying to write a commit-filter to hyperlink references to our bug
>> tracker.  It seems to work fine for commit detailed pages, but not at
>> all for the log view.  Since our developers often make brief messages
>> like "fixes #123' so getting the url in the log view is arguably more
>> useful than in the detail page.
>
> I think this is an issue of the cost of forking a filter process for
> each line in the log view.  Now that we have Lua filters that may not be
> so much of an issue, but I don't think we can just start using the
> source filter on the log view due to the impact that will have on people
> with an "exec" source-filter already configured.
>
> Perhaps we need to add a "log-filter" which you could configure to be
> the same as "source-filter" but which can be left blank for people whose
> links are normally in the body of the commit message.
>

I think a "log-filter" with the same API sounds good and fits my use 
case.  I'll take a stab at that after the owner-filter work.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* commit-filter not being applied on log page
  2014-08-01 18:06   ` chris.burroughs
@ 2014-12-24  2:03     ` Jason
  0 siblings, 0 replies; 5+ messages in thread
From: Jason @ 2014-12-24  2:03 UTC (permalink / raw)


On Fri, Aug 1, 2014 at 12:06 PM, Chris Burroughs <chris.burroughs at gmail.com>
wrote:
>
> I think a "log-filter" with the same API sounds good and fits my use
> case.  I'll take a stab at that after the owner-filter work.
>

Ready now, when you are.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.zx2c4.com/pipermail/cgit/attachments/20141223/6e67dbd8/attachment.html>


^ permalink raw reply	[flat|nested] 5+ messages in thread

* commit-filter not being applied on log page
  2014-08-01  9:44 ` john
  2014-08-01 18:06   ` chris.burroughs
@ 2015-01-05 19:03   ` chris.burroughs
  1 sibling, 0 replies; 5+ messages in thread
From: chris.burroughs @ 2015-01-05 19:03 UTC (permalink / raw)


On 08/01/2014 05:44 AM, John Keeping wrote:
> On Thu, Jul 31, 2014 at 10:27:19AM -0400, Chris Burroughs wrote:
>> I'm trying to write a commit-filter to hyperlink references to our bug
>> tracker.  It seems to work fine for commit detailed pages, but not at
>> all for the log view.  Since our developers often make brief messages
>> like "fixes #123' so getting the url in the log view is arguably more
>> useful than in the detail page.
>
> I think this is an issue of the cost of forking a filter process for
> each line in the log view.  Now that we have Lua filters that may not be
> so much of an issue, but I don't think we can just start using the
> source filter on the log view due to the impact that will have on people
> with an "exec" source-filter already configured.
>
> Perhaps we need to add a "log-filter" which you could configure to be
> the same as "source-filter" but which can be left blank for people whose
> links are normally in the body of the commit message.
>

I started to implement a 'log-filter' but ran into some design problems:

  * My initial use case was to create a link for 'fixes #123' style 
commit messages.  However, the entire log summary snippet is already 
wrapped in an <a href> to commit/?id=foo.  I wouldn't want to loose that 
or make it uglier in service of convenience bug tracker links.  Since 
html links can not be nested I'm not sure what options that leaves.

  * With showmsg=1, should the commit or log filter be used?


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-01-05 19:03 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-31 14:27 commit-filter not being applied on log page chris.burroughs
2014-08-01  9:44 ` john
2014-08-01 18:06   ` chris.burroughs
2014-12-24  2:03     ` Jason
2015-01-05 19:03   ` chris.burroughs

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).