git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Paul Mackerras <paulus@ozlabs.org>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] gitk: Make web links clickable
Date: Thu, 29 Aug 2019 10:50:11 +1000	[thread overview]
Message-ID: <20190829005011.GA3297@blackberry> (raw)
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:
> 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.

  reply	other threads:[~2019-08-29  0:53 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-26 22:14 [PATCH] gitk: Make web links clickable Paul Mackerras
2019-08-27 15:33 ` Barret Rhoden
2019-08-27 20:32 ` Junio C Hamano
2019-08-29  0:50   ` Paul Mackerras [this message]
2019-08-29  3:46     ` Junio C Hamano
2019-08-27 21:58 ` Pratyush Yadav
2019-08-29  1:27 ` [PATCH v2] " Paul Mackerras
2019-08-29 18:32   ` Pratyush Yadav
2019-09-13 23:33     ` Paul Mackerras
2019-09-14 14:30       ` Pratyush Yadav

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190829005011.GA3297@blackberry \
    --to=paulus@ozlabs.org \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).