git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jon Seymour <jon.seymour@gmail.com>
To: Jeff King <peff@peff.net>
Cc: Jonathan Nieder <jrnieder@gmail.com>,
	Junio C Hamano <gitster@pobox.com>,
	David Aguilar <davvid@gmail.com>, Andreas Ericsson <ae@op5.se>,
	Joey Hess <joey@kitenet.net>,
	Git Mailing List <git@vger.kernel.org>,
	"david@lang.hm" <david@lang.hm>,
	Pau Garcia i Quiles <pgquiles@elpauer.org>
Subject: Re: RFC: a plugin architecture for git extensions?
Date: Mon, 9 May 2011 21:28:26 +1000	[thread overview]
Message-ID: <BANLkTikQQNoYf=vZwMwAXPu0-S_2s9Y79w@mail.gmail.com> (raw)
In-Reply-To: <20110509112428.GE9060@sigill.intra.peff.net>

On Mon, May 9, 2011 at 9:24 PM, Jeff King <peff@peff.net> wrote:
> On Mon, May 09, 2011 at 09:07:31PM +1000, Jon Seymour wrote:
>
>> > I don't really see any need for git's role in this to be more than:
>> >
>> >  1. Check a set list of directories for extra paths to add to PATH and
>> >     MANPATH.
>> >
>> >  2. Tell the packager's script what that set list is, so they can be
>> >     sure to put their files in the right spot.
>> >
>>
>> The problem with presenting a list of possible directories is that
>> given a list, the choice is ambiguous.
>
> Well, yeah. Though between git and the package script, I think it ends
> up being simplified to the --system-extension-dir thing, because out of
> the three places I mentioned you might want to install something:
>
>  1. You definitely don't want to install in the distro location. If you
>     did, then you would be a distro package, and therefore would not
>     have to be asking git where that location is.
>
>  2. You do need to know where the locally-installed system path is, so
>     we provide an option to query that.
>
>  3. You don't need to ask git where the per-user path is. It will be at
>     some well-known location like $HOME/.gitplugins.
>
> That being said, I think you are more concerned with not presenting
> too many choices to the user. And that still leaves one choice: system
> (2) versus user (3) install.
>
> But I don't think there's a way around that. You are going to have users
> of both types, and you will want to serve them. You can make a guess
> based on something like writability of the system directory, I suppose,
> and let them override via the command-line if they want to.
>
> That strikes me as somewhat flaky and unpredictable, but I am perhaps
> not a representative sample. I have always thought the Windows "if you
> install as Administrator, it is available to everybody, but otherwise it
> is available only to you" behavior was confusing, and this seems like
> the same thing.
>
>> Sure a decision procedure can be arrived at to choose, but it might be
>> hard for the user to predict what decision the procedure will reach.
>> In that case, the user must be prompted for a selection.
>
> I think this is in agreement with what I just wrote above.
>
>> Again, part of the idea is to give the extension installer some degree
>> of confidence that the selected prefix/bin is, in fact, in the path
>> and to give the user an override in case the compiled in default isn't
>> workable for some reason (for example, due to a permissions issue).
>
> So from this, I gather you would like to see something like:
>
>  $ cd git-work && ./install
>  fatal: unable to write to /usr/local/share/git: permission denied
>  You may install git-work just for the current user with:
>
>    ./install --user
>
> I.e., the script has a predictable and sane behavior, but you guide the
> user through overriding it if need be. That doesn't seem unreasonable to
> me.
>
> Anyway, with respect to "core.preferredPluginPath", if you do want to go
> in that direction, I don't think any extra git support is needed. You
> can already just do "git config --path core.preferredPluginPath" to get
> the value (with tilde-expansion, even).
>
> -Peff
>

I still think it would be useful for the git wrapper to add
core.preferredPluginPrefix/bin to
the PATH, so that there is no requirement for the user to do this
separately via mechanisms
that will differ according to platform, shell etc.

jon.

  reply	other threads:[~2011-05-09 11:28 UTC|newest]

Thread overview: 105+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-27  3:36 RFC: a plugin architecture for git extensions? Jon Seymour
2011-04-27  3:58 ` Jonathan Nieder
2011-04-27  5:06   ` Jon Seymour
2011-04-27  5:07 ` Junio C Hamano
2011-04-27  5:10   ` Jon Seymour
2011-04-27  5:17     ` Junio C Hamano
2011-04-27  5:33       ` Jon Seymour
2011-04-27  5:37         ` Jon Seymour
2011-04-27  5:39         ` Junio C Hamano
2011-04-27  5:42           ` Jon Seymour
2011-04-27  7:15           ` Jon Seymour
2011-04-27  7:57             ` Michael J Gruber
2011-04-27  8:15               ` Jon Seymour
2011-04-27  8:40                 ` Jon Seymour
2011-04-27  9:36                   ` Motiejus Jakštys
2011-04-27  9:59                     ` Jon Seymour
2011-04-27 10:48                       ` Motiejus Jakštys
2011-04-27 10:21             ` Carlos Martín Nieto
2011-04-27 10:44               ` Jon Seymour
2011-04-27 11:38         ` Fredrik Gustafsson
2011-04-27 11:57           ` Jon Seymour
2011-04-27 22:32         ` Pau Garcia i Quiles
2011-04-27 22:47           ` Jon Seymour
2011-04-27 11:01 ` Ævar Arnfjörð Bjarmason
2011-04-27 11:42   ` Jon Seymour
2011-05-13 19:32     ` Enrico Weigelt
2011-04-27 12:08 ` Andreas Ericsson
2011-04-27 12:50   ` Jon Seymour
2011-04-27 13:07     ` Felipe Contreras
2011-04-27 13:59       ` Jon Seymour
2011-04-27 14:52     ` Andreas Ericsson
2011-04-27 15:36       ` Jon Seymour
2011-04-27 16:13         ` Jon Seymour
2011-04-27 17:07           ` A Large Angry SCM
2011-04-28  3:07             ` Jon Seymour
2011-04-28  3:26               ` Jon Seymour
2011-04-28  5:04                 ` Jon Seymour
2011-04-28  6:15                   ` Jon Seymour
2011-04-28 16:16               ` david
2011-04-29  3:35                 ` Jon Seymour
2011-04-27 19:16           ` Motiejus Jakštys
2011-04-27 19:19             ` Motiejus Jakštys
2011-04-27 17:34       ` Junio C Hamano
2011-04-27 18:28         ` Junio C Hamano
2011-04-27 18:49           ` Drew Northup
2011-04-27 19:42             ` Joey Hess
2011-04-27 20:16               ` Drew Northup
2011-04-27 21:38               ` Junio C Hamano
2011-04-27 22:08                 ` Jonathan Nieder
2011-04-27 22:32                   ` Jon Seymour
2011-04-28  9:07                     ` Andreas Ericsson
2011-04-27 23:27                   ` Junio C Hamano
2011-04-27 23:42                     ` Jonathan Nieder
2011-04-28  0:10                       ` Junio C Hamano
2011-04-28  0:50                         ` Jon Seymour
2011-04-28  0:54                           ` Jon Seymour
2011-04-28  0:55                           ` david
2011-04-28  2:08                             ` Jon Seymour
2011-04-28  2:15                               ` Jon Seymour
2011-04-28  2:49                                 ` Jon Seymour
2011-04-28  9:25                                   ` Andreas Ericsson
2011-04-28 10:56                                     ` Jon Seymour
2011-04-28 11:11                                       ` Jonathan Nieder
2011-04-28 11:20                                         ` Jon Seymour
2011-05-05 21:41                                       ` David Aguilar
2011-05-05 21:53                                         ` Junio C Hamano
2011-05-05 23:51                                           ` Jon Seymour
2011-05-06  4:47                                             ` Junio C Hamano
2011-05-06  6:20                                               ` Jon Seymour
2011-05-06  6:56                                                 ` Jonathan Nieder
2011-05-06  7:03                                                   ` Jonathan Nieder
2011-05-06 14:07                                                   ` Jon Seymour
2011-05-06 14:17                                                     ` Jonathan Nieder
2011-05-06 14:29                                                       ` Jon Seymour
2011-05-06 14:50                                                         ` Jonathan Nieder
2011-05-08  4:28                                                           ` Jon Seymour
2011-05-08  6:49                                                             ` Jonathan Nieder
2011-05-08  7:42                                                               ` Jon Seymour
2011-05-06 17:23                                                     ` Jeff King
2011-05-07  8:24                                                       ` John Szakmeister
2011-05-08  4:44                                                       ` Jon Seymour
2011-05-09  7:35                                                         ` Jeff King
2011-05-09  7:49                                                           ` Jon Seymour
2011-05-09  8:12                                                             ` Jeff King
2011-05-09  8:45                                                               ` Jon Seymour
2011-05-09 10:44                                                                 ` Jeff King
2011-05-09 11:07                                                                   ` Jon Seymour
2011-05-09 11:13                                                                     ` Jon Seymour
2011-05-09 11:24                                                                     ` Jeff King
2011-05-09 11:28                                                                       ` Jon Seymour [this message]
2011-05-09 12:21                                                                         ` Jeff King
2011-05-09 22:50                                                                           ` Jon Seymour
2011-05-08 13:13                                                   ` Jon Seymour
2011-05-09  4:36                                           ` Miles Bader
2011-05-14 12:51                                             ` David Aguilar
2011-04-28  9:11                                 ` Andreas Ericsson
2011-04-28 10:38                                   ` Jon Seymour
2011-04-28  7:40                               ` Pau Garcia i Quiles
2011-04-28  8:09                                 ` Jon Seymour
2011-04-28  9:11                                   ` Pau Garcia i Quiles
2011-04-28  9:42                                     ` Jon Seymour
2011-04-28  0:06                     ` Jon Seymour
2011-04-28  0:08                       ` Jon Seymour
2011-04-27 21:29 ` Motiejus Jakštys
2011-04-27 21:47   ` Jon Seymour

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='BANLkTikQQNoYf=vZwMwAXPu0-S_2s9Y79w@mail.gmail.com' \
    --to=jon.seymour@gmail.com \
    --cc=ae@op5.se \
    --cc=david@lang.hm \
    --cc=davvid@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=joey@kitenet.net \
    --cc=jrnieder@gmail.com \
    --cc=peff@peff.net \
    --cc=pgquiles@elpauer.org \
    /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 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).