From: Chris Packham <judge.packham@gmail.com>
To: Jeff Epler <jepler@unpythonic.net>
Cc: git@vger.kernel.org
Subject: git web--browse error handling URL with & in it (Was Re: [RFC/PATCH] Configurable hyperlinking in gitk)
Date: Sun, 18 Sep 2011 12:30:49 +1200 [thread overview]
Message-ID: <4E753BB9.7030804@gmail.com> (raw)
In-Reply-To: <4E752E32.2010208@gmail.com>
On 18/09/11 11:33, Chris Packham wrote:
> On 18/09/11 01:45, Jeff Epler wrote:
>>>> There are probably better names for the configuration options, too.
>>>
>>> It'd be nice if the config variables weren't gitk specific. .re and .sub
>>> could be applied to gitweb and maybe other git viewers outside of
>>> gig.git might decide to use them. My bikeshedding suggestion would be to
>>> just drop the gitk prefix and have linkify.re and linkify.sub.
>>
>> This seems like a reasonable idea, though since the implementation
>> languages of gitk and gitweb are different it means some REs might get
>> different interpretations in the different programs.
>>
>>> Sometimes when a commit fixes multiple bugs we put all the bug numbers
>>> in separated by commas. I don't know Tcl well enough to tell if your
>>> code supports that or not.
>>
>> Multiple matches per line are OK, but they must be non-overlapping.
>>
>> Looking at the actual practice in Debian changelogs, I see that they do
>> this:
>> evince/changelog.Debian.gz: (Closes: #388368, #396467, #405130)
>> so my original example would only linkify "Closes: #388638". But a
>> revised pattern of #(\d+) would linkify "#388368", "#396467" and "#405130".
>> (but risk a few more "false positive" links). I should revise my
>> example accordingly.
>>
>> As for the problems with your substitutions, "&" is special in a tcl
>> regsub (it stands for the whole matched string, like \0), so you'd want
>> to use a substitution like
>> git config gitk.linkify.debian-bts.sub \
>> 'http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=\1\&foo=bar'
>
> Hmm no joy with \&. Seems to upset the invocation of git web-browse
>
> git config gitk.linkify.bugtracker.sub \
> 'https://internalhost/code\&stuff/bugs.php?id=\1'
>
> gitk
> /home/chrisp/libexec/git-core/git-web--browse: line 167:
> stuff/bugs.php?id=bug123: No such file or directory
> fatal: 'web--browse' appears to be a git command, but we were not
> able to execute it. Maybe git-web--browse is broken?
This is probably a issue with git web--browse and nothing to do with
your changes.
Sure enough this works fine
git web--browse --browser=firefox \
https://internalhost/code\&stuff/bugs.php?id=foo
While this doesn't
git web--browse https://internalhost/code\&stuff/bugs.php?id=foo
/home/chrisp/libexec/git-core/git-web--browse: line 167:
stuff/bugs.php?id=foo: No such file or directory
fatal: 'web--browse' appears to be a git command, but we were not
able to execute it. Maybe git-web--browse is broken?
Neither does this
git web--browse --browser=konqueror \
https://internalhost/code\&stuff/bugs.php?id=foo
A little bit more info that might help diagnose the issue - I'm running
openSUSE 11.4 (kde 4.6) which ships with firefox set as the default web
browser so 'kfmclient newTab http://www.example.com' actually opens firefox.
However trying kfmclient with my funny URL still works
kfmclient newTab https://internalhost/code\&stuff/bugs.php?id=foo
I'm a little stumped as to what is going wrong in git web--browse.
next prev parent reply other threads:[~2011-09-18 0:30 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-17 2:29 [RFC/PATCH] Configurable hyperlinking in gitk Jeff Epler
2011-09-17 9:26 ` Chris Packham
2011-09-17 10:01 ` Chris Packham
2011-09-17 13:45 ` Jeff Epler
2011-09-17 23:33 ` Chris Packham
2011-09-18 0:30 ` Chris Packham [this message]
2011-09-18 0:32 ` git web--browse error handling URL with & in it (Was Re: [RFC/PATCH] Configurable hyperlinking in gitk) Chris Packham
2011-09-18 3:29 ` Jeff King
2011-09-18 10:20 ` [PATCH] git-web--browse: invoke kfmclient directly Chris Packham
2011-09-18 18:38 ` Jeff King
2011-09-19 9:26 ` [RFC/PATCHv2] git-web--browse: avoid the use of eval Chris Packham
2011-09-19 18:34 ` Jeff King
2011-09-20 9:04 ` Chris Packham
2011-09-20 18:49 ` Jeff King
2011-09-20 19:35 ` Junio C Hamano
2011-09-19 17:57 ` [PATCH] git-web--browse: invoke kfmclient directly Junio C Hamano
2011-09-19 18:20 ` Jeff King
2011-09-19 20:42 ` Junio C Hamano
2011-09-19 20:44 ` Jeff King
2011-09-19 21:22 ` Junio C Hamano
2011-09-19 21:46 ` Andreas Schwab
2011-09-19 22:23 ` Jeff King
2011-09-19 22:28 ` Junio C Hamano
2011-09-19 20:44 ` Andreas Schwab
2011-09-19 21:32 ` Jakub Narebski
2011-09-18 14:46 ` git web--browse error handling URL with & in it (Was Re: [RFC/PATCH] Configurable hyperlinking in gitk) Christian Couder
2011-09-19 15:05 ` [RFC/PATCH] Configurable hyperlinking in gitk Marc Branchaud
2011-09-18 18:50 ` Jakub Narebski
2011-09-22 1:31 ` Jeff Epler
2011-09-22 2:15 ` [PATCH v3] " Jeff Epler
2011-10-11 18:37 ` [RESEND PATCH " Jeff Epler
2011-10-11 22:13 ` Junio C Hamano
2011-10-12 9:07 ` Chris Packham
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4E753BB9.7030804@gmail.com \
--to=judge.packham@gmail.com \
--cc=git@vger.kernel.org \
--cc=jepler@unpythonic.net \
/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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.