"GOT", but the "O" is a cute, smiling pufferfish. Index | Thread | Search

From:
Omar Polo <op@omarpolo.com>
Subject:
Re: gotwebd: linkables lines in blame page
To:
Tracey Emery <tracey@traceyemery.net>
Cc:
gameoftrees@openbsd.org
Date:
Tue, 09 Aug 2022 17:34:02 +0200

Download raw body.

Thread
Tracey Emery <tracey@traceyemery.net> wrote:
> On Tue, Aug 09, 2022 at 04:48:04PM +0200, Omar Polo wrote:
> > This makes it possible to link lines in the blame page.  For example:
> > 
> > https://git.omarpolo.com/?index_page=0&path=vc-got.git&action=blame&commit=bc158324418fd8bef96a7f62856679de2569030f&folder=&file=vc-got.el#676
> > 
> > I'm adding it to the blame page since we're serving blobs as-is, the
> > only page with the file content that's browsable in an HTML page is
> > the blame page.
> 
> I'm concerned about adding this to blame. Some blame operations can take
> a long time. What if we change our blob to be more like gitweb's and add
> a third type of "raw," which would replace our blob? Then our blob would
> have HTML output and the line linking, which is really cool.

I went with the blame page because I'm lazy :D

Agreed, it'd be better to improve the blob page.  I'll look into it
this week if nobody beats me ;)

> > 
> > P.S.: what do you think if we introduce something a printf-like
> > fcgi_gen_responsef?
> > 
> 
> Can you expound a bit here? What would it be used for? If it is used for
> something like this, I think it would be a good idea and reduce lines:
> 
> fcgi_gen_responsef(c, "<a href='#%s'>%s</a>", out_buff, out_buff);
> 
> Is that what you mean?

Yep, that's exactly what i had in mind.  It could get rid of long
sequences of code and make it easier to follow.

I'll try to add it and see how it goes.


Thanks,