All of lore.kernel.org
 help / color / mirror / Atom feed
From: Moe <moe@signalbeam.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: Miklos Vajna <vmiklos@frugalware.org>, git@vger.kernel.org
Subject: Re: [PATCH] Introduce the GIT_CONFIG_EXTRA environment variable
Date: Sat, 19 Dec 2009 05:44:10 +0100	[thread overview]
Message-ID: <4B2C5A1A.8000201@signalbeam.net> (raw)
In-Reply-To: <7vhbrnodd9.fsf@alter.siamese.dyndns.org>

Junio C Hamano wrote:
> Miklos Vajna <vmiklos@frugalware.org> writes:
> 
>> This is like GIT_CONFIG but it is not read instead of .git/config, but
>> in addtition to it.
>>
>> Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
>> ---
>>
>> On Fri, Dec 18, 2009 at 11:54:32PM +0100, Moe <moe@signalbeam.net> wrote:
>>> $GIT_CONFIG doesn't work for this purpose because when set
>>> git will *only* read the referenced file and ignore the
>>> repository settings.
>> What about this?
> 
> 
> The patch text itself may be fine, in the sense that it makes "we read
> from three" to "we now read from four", but I am not impressed.
> 
> I find the original use case highly moronic.
>
> For people to be sharing an account, hence $HOME, there must be a reason.
> They want to (rather, the administrator wants them to) use a common shared
> set of settings, so $HOME/.gitconfig should be shared among them, just
> like $HOME/.emacs and $HOME/.login are, unless there is some strong reason
> to treat .gitconfig any differently from all the other $HOME/.whatever
> files.  But I don't think there wasn't any argument to defend that.

I'm not arguing to treat .gitconfig differently from other
dot-files, but to treat it differently from .git/config.

The former is user-specific, the latter is repository-specific.

For a contrived analogy: Imagine apache would ignore the contents
of .htaccess files when you start httpd with the "-f" switch to
load a different configuration file.

> That makes the patch doubly suspect and throws it into "because we can",
> not "because we should".
> 
> Wouldn't it be just a matter of giving different HOME after they log-in?
> 
> After all, Moe will be giving _some_ way to his users set different value
> to GIT_CONFIG_EXTRA depending on who they really are, and that same
> mechanism should be usable to set different HOME to them, no?

The individual users are identified by their ssh key. Ssh sets a
distinct environment variable for each, which in turn is used in
.bash_profile to read an additional user-profile.

Yes, we could overwrite $HOME but that would defeat the purpose.

The goal of this setup is to share almost all settings.
Overwriting $HOME would turn this upside down. Instead of diverting
the two bits that we want to customize (git identity and editor
preferences) we would then have to duplicate all other dot-files
for each virtual user - and probably watch out for unforeseen side-effects.

> As $HOME/.gitconfig is relative to the value of that environment variable,
> I don't see a reason for us to fall into this "three is not enough, but
> when we add another, we are fine" attitude, which makes me suspect that
> there is something fundamentally wrong there.

I understand the sentiment.

Without drifting into a discussion about the merit of shared
unix-accounts (they do make a lot of sense in some scenarios)
I hope this can still make it, considering the small size of
the patch and the .git/config vs ~/.gitconfig argument.


-- 
Kind regards, Moe

  reply	other threads:[~2009-12-19  4:44 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-18 22:54 FEATURE REQUEST: Env override GIT_GLOBAL_CONFIG Moe
2009-12-19  1:32 ` [PATCH] Introduce the GIT_CONFIG_EXTRA environment variable Miklos Vajna
2009-12-19  2:09   ` Shawn O. Pearce
2009-12-19  3:06     ` Moe
2009-12-19 14:25     ` Miklos Vajna
2009-12-19  3:24   ` Junio C Hamano
2009-12-19  4:44     ` Moe [this message]
2009-12-19  5:55       ` Junio C Hamano
2009-12-19  7:20         ` Moe
2009-12-19 10:54           ` Johannes Schindelin
2009-12-19 11:38             ` Moe
2009-12-19 14:45           ` Nanako Shiraishi
2009-12-19 15:30         ` [PATCH] Introduce the GIT_HOME " Miklos Vajna
2009-12-19 16:18           ` Michael J Gruber
2009-12-19 16:44             ` Miklos Vajna
2009-12-19 17:10           ` Matthieu Moy
2009-12-19 19:13             ` Junio C Hamano
2009-12-21 10:25               ` Matthieu Moy
2009-12-21 15:59                 ` Jeff King
2009-12-21 16:26                   ` Matthieu Moy
2009-12-21 16:54                     ` Michael J Gruber
2009-12-19 19:21           ` Junio C Hamano
2009-12-20  0:34             ` Miklos Vajna

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=4B2C5A1A.8000201@signalbeam.net \
    --to=moe@signalbeam.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=vmiklos@frugalware.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 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.