Re: ~/.git/config ?

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

 



Timo Hirvonen wrote:

> Anand Kumria <wildfire@xxxxxxxxxxxxxxxxxx> wrote:
> 
>> Hi,
>> 
>> git is unable to construct a reasonable default email address in my
>> current environment.  So, I use GIT_AUTHOR_EMAIL and GIT_COMMITTER_EMAIL
>> to override things.
>> 
>> This has worked well but, now, I need to vary the email address for some
>> repositories.  Unfortunately the environment variables override
>> .git/config.
>> 
>> It would be good if things were like:
>>      - try to construct one automagically
>>      - use ~/.git/config (if available)
>>      - use .git/config
>>      - use environment variables
>> 
>> That way I could set my default email address in ~/.git/config and
>> override it as required for those repositories that need it.
> 
> I backup my $HOME using git, so there's a .git directory in ~.  I don't
> think a global config file is really needed but it would be nice if
> .git/config would override the environment variables, not the other way
> around.

Well, I'm not sure if environmental variables overriding wouldn't make
invocations like 'GIT_DIR=something git command' possible.

There are templates, also for config. Currently git lacks user (not
repository) config file, e.g. ~/.gitconfig (common for all repositories).

-- 
Jakub Narebski
Warsaw, Poland

-
: 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]