Re: git should not use a default user.email config value

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 08/12/2013 02:39 PM, Jeff King wrote:
> On Mon, Aug 12, 2013 at 09:52:45PM +1000, Andrew Ardill wrote:
> 
>> On 11 August 2013 02:58, Junio C Hamano <gitster@xxxxxxxxx> wrote:
>>> Perhaps we need a lighter-weight mechanism
>>>
>>>         git init --profile=open
>>>         git clone --profile=open git://git.kernel.org/git.git
>>
>> This is something I would definitely use.
>>
>> All of my work git directories are in a separate folder to my other
>> git directories, and as such it would be extremely convenient if every
>> repository under that folder defaulted to the same profile. That may
>> be asking for too much though!
> 
> We could do something like the patch below, which allows:
> 
>   $ git config --global include./magic/.path .gitconfig-magic
> 
> to read ~/.gitconfig-magic only when we are in a repository with a
> directory component "/magic/".
> 
> I can see how such a thing might be useful, even though I do not have a
> use for that much flexibility myself. I find myself doing this trick for
> things like editor settings, but not for git config. So do not count
> this necessarily as a vote for doing this; it was a fun exercise for me
> that others might find useful.

We could satisfy a whole class of wishes by supporting
user-wide/system-wide git hooks like

    ~/.githooks/{pre,post}-clone     /etc/githooks/{pre,post}-clone
    ~/.githooks/{pre,post}-init      /etc/githooks/{pre,post}-init

I suppose similar functionality could be implemented via git aliases,
but hook scripts are easier to install and share.

Michael

-- 
Michael Haggerty
mhagger@xxxxxxxxxxxx
http://softwareswirl.blogspot.com/
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]