From: Junio C Hamano <gitster@pobox•com>
To: Jeff King <peff@peff•net>
Cc: Nathan Neulinger <nneul@neulinger•org>,
Jonathan Nieder <jrnieder@gmail•com>,
git@vger•kernel.org
Subject: Re: feature request - implement a "GIT_AUTHOR_EMAIL" equivalent, but processed BEFORE .gitconfig
Date: Fri, 30 May 2014 14:35:37 -0700 [thread overview]
Message-ID: <xmqq1tvb7xw6.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <20140530200945.GB5513@sigill.intra.peff.net> (Jeff King's message of "Fri, 30 May 2014 16:09:45 -0400")
Jeff King <peff@peff•net> writes:
> On Fri, May 30, 2014 at 02:58:47PM -0500, Nathan Neulinger wrote:
>
>> Not really, since there are lots of servers,...
>
> But I think anything you could set up in the environment could be set up
> in an on-the-fly $HOME. For example, instead of:
>
> GIT_WEAK_AUTHOR_NAME=$name
> GIT_WEAK_AUTHOR_EMAIL=$email
>
> do:
>
> HOME=$(mktemp -d gitenv.XXXXXX")
> trap 'rm -rf "$HOME"' 0
> git config --global user.name "$name"
> git config --global user.email "$email"
>
> You'd want to link in anything else you actually _want_ in $HOME, but
> that also gives an opportunity to set up application-specific options
> based on the user (e.g., if you could pull their .vimrc from some shared
> storage or something).
Yes. I agree that "Not really, ..." was not very convincing to me.
Another thing that might be useful in general (i.e. I am not
particularly trying to help the "shared" configuration on the topic
of this thread) is to allow environment variable substitution in
expand_user_path().
Nathan's installation can set a "GIT_MYSELF" and then have something
like this in the shared $HOME/.gitconfig
[include]
path = /usr/local/users/$GIT_MYSELF/ident
we could even make the whole thing fail when GIT_MYSELF is not set
but I haven't thought things through ;-)
next prev parent reply other threads:[~2014-05-30 21:35 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-30 18:19 feature request - implement a "GIT_AUTHOR_EMAIL" equivalent, but processed BEFORE .gitconfig Nathan Neulinger
2014-05-30 18:27 ` Jonathan Nieder
2014-05-30 18:44 ` Nathan Neulinger
2014-05-30 19:48 ` Junio C Hamano
2014-05-30 19:58 ` Nathan Neulinger
2014-05-30 20:09 ` Jeff King
2014-05-30 21:35 ` Junio C Hamano [this message]
2014-06-02 6:59 ` Jeff King
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=xmqq1tvb7xw6.fsf@gitster.dls.corp.google.com \
--to=gitster@pobox$(echo .)com \
--cc=git@vger$(echo .)kernel.org \
--cc=jrnieder@gmail$(echo .)com \
--cc=nneul@neulinger$(echo .)org \
--cc=peff@peff$(echo .)net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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