Re: [PATCH 1/2] Add possibility to store configuration in ~/.config/git/config file

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

 



Junio C Hamano <gitster@xxxxxxxxx> writes:

> If you read from .gitconfig and also from the new location, but update
> only the new location,

That's not exactly the proposal. First, I agree that the first questions
to be answered is what happens on reading. About writing, I don't feel
very strongly about it, but I think it's reasonable to write to the new
location if the old location doesn't exist, and the new one does. This
way, ~/.gitconfig haters will create their ~/.config/git/config, and
won't be bothered with the former.

Obviously, trying too hard to write to the new location would harm old
versions users, so for example, it would be unreasonable to write to the
new location unconditionally.

> people who use two versions of git will be in a very confusing
> situation. Randomly, some of their updates are always in effect,

Only if they created manually the new file. People unaware of the change
won't be affected at all.

Since most people don't read the docs, most people will be
unaffected ;-).

>  - If ~/.gitconfig exists, do not do anything new.  Just exercise the
>    original code.  For these users, ~/.config/ does _not_ exist as far as
>    Git is concerned.

As Jeff already pointed out, this would be very confusing for a user
having the new file, since running once "git config --global" with an
old version would shadow the whole configuration by creating an almost
empty ~/.gitconfig file.

We clearly want to read both. I'm not sure which should take precedence
when the same variable is defined in both.

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
--
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]