git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] gitk: Make web links clickable

From
Paul Mackerras <paulus@ozlabs.org>
Date
Aug 29, 2019, 00:50 UTC
Message-ID
<20190829005011.GA3297@blackberry>
In-Reply-To
<xmqqimqi2vtt.fsf@gitster-ct.c.googlers.com>
Hi Junio,
On Tue, Aug 27, 2019 at 01:32:30PM -0700, Junio C Hamano wrote:
Show 36 quoted lines
> Paul Mackerras <paulus@ozlabs.org> writes:
> 
> > This makes gitk look for lines in the commit message which start with
> > "Link:" or "BugLink:" followed by a http or https URL, and make the
> > URL clickable.  Clicking on it will invoke an external web browser with
> > the URL.
> >
> > The web browser command is by default "xdg-open" on Linux, "open" on
> > MacOS, and "cmd /c start" on Windows.  The command can be changed in
> > the preferences window, and it can include parameters as well as the
> > command name.  If it is set to the empty string then URLs will no
> > longer be made clickable.
> >
> > Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
> > ---
> 
> >  gitk | 51 ++++++++++++++++++++++++++++++++++++++++++++++++++-
> >  1 file changed, 50 insertions(+), 1 deletion(-)
> >
> > diff --git a/gitk b/gitk
> > index a14d7a1..4577150 100755
> > --- a/gitk
> > +++ b/gitk
> > @@ -7016,6 +7016,7 @@ proc commit_descriptor {p} {
> >  
> >  # append some text to the ctext widget, and make any SHA1 ID
> >  # that we know about be a clickable link.
> > +# Also look for lines of the form "Link: http..." and make them web links.
> 
> FWIW, I personally hate those "Link:" that do not say what the links
> are for (IOW, I am OK with "BugLink:" or even "Bug:").
> 
> In any case, I polled your repository but I did not find anything to
> pull.  Do you want me to start my own gitk mirror, queue this patch
> there and pull from it myself, or is this meant to be a preview of
> what you'll tell me to pull in a few days?
I was expecting some comments and suggestions, so I didn't push it out
yet.  One suggestion which seems reasonable is to match any http or
https URL anywhere in the commit description, not just with Link: or
BugLink: at the start of the line.  What do you think of that?  It's
quite easy to do.  Also it should stop at whitespace rather than going
to the end of the line.
Paul.
Previous: Junio C HamanoNext: Junio C Hamano
Message 4 of 10 in “gitk: Make web links clickable”
  1. gitk: Make web links clickablePaul Mackerras, Aug 26, 2019
  2. Barret RhodenAug 27, 2019
  3. Junio C HamanoAug 27, 2019
  4. Paul MackerrasAug 29, 2019
  5. Junio C HamanoAug 29, 2019
  6. Pratyush YadavAug 27, 2019
  7. gitk: Make web links clickablePaul Mackerras, Aug 29, 2019
  8. Pratyush YadavAug 29, 2019
  9. Paul MackerrasSep 13, 2019
  10. Pratyush YadavSep 14, 2019

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.