Michael Haggerty <mhag...@alum.mit.edu> writes:

> On 08/10/2013 08:47 AM, Jeff King wrote:
>> But I think MX records and deliverability is beside the point. Even in a
>> case where we come up with a valid, deliverable address, is that what
>> the user wants to have in their commit history for all time?
> I intentionally don't set user.email in my ~/.gitconfig because I use
> different identities (on the same machine) depending on what project I
> am committing to (open-source vs. work).  After I clone a repo, I *rely*
> on Git reminding me to set user.email on my first commit, because I
> invariably forget to set it myself.  And for me, *any* universal,
> heuristically-determined email address would be wrong for me for at
> least some repos.


If we tweaked the "template" mechanism used by the init_db() more
accessible, because both "git init" and "git clone" know to honor
the templates, you could prepare ~/.git-profile/{work,open}/config
files that define user.email/user.name in there.  The existing way
to use "template" mechanism is a bit too heavy-handed in the sense
that if you want to tweak the "config" using it, you also have to
have everything else in the templates, which makes it unwieldy to
use.  Perhaps we need a lighter-weight mechanism

        git init --profile=open
        git clone --profile=open git://git.kernel.org/git.git

that does:

 (1) exactly the same as what the current code do without the new
     option, then

 (2) configure "include.path" to point at "~/.git-profile/open" at
     the very end

or something?  Then the "profile" files can have a shared setting
for the kinds of projects (the above examples are "open" projects,
and you would have another kind, "work" projects) that will apply to
all the projects of that nature. You update ~/.git-profile/open and
then that update applys to all repositories on your open projects.

The above is a tangent and independent from allowing the site owner
to set "user.requireExplicit = true" in /etc/gitconfig.
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to