Re: [PATCH 4/4 v8] config: write to $XDG_CONFIG_HOME/git/config file if appropriate

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

 



Junio C Hamano <gitster@xxxxxxxxx> writes:

> Matthieu Moy <Matthieu.Moy@xxxxxxx> writes:
>
>> From: Huynh Khoi Nguyen Nguyen <Huynh-Khoi-Nguyen.Nguyen@xxxxxxxxxxxxxxx>
>>
>> Git will be able to write to $XDG_CONFIG_HOME/git/config, a new
>> ...
>> Advice for users who often come back to an old version of Git: you
>> shouldn't create this file.
>
> Hrm, is there a better way to give this advice to the _users_?  The
> log message is primarily for people who need to dig the development
> history of Git, and they are not the people who will be hurt by this
> change.  Perhaps the change to Documentation/git-config.txt in this
> patch needs to be a bit more detailed?

We can squash this into PATCH 1:

--- a/Documentation/git-config.txt
+++ b/Documentation/git-config.txt
@@ -209,7 +209,9 @@ $XDG_CONFIG_HOME/git/config::
        Second user-specific configuration file. If $XDG_CONFIG_HOME is not set
        or empty, $HOME/.config/git/config will be used. Any single-valued
        variable set in this file will be overwritten by whatever is in
-       ~/.gitconfig.
+       ~/.gitconfig. Support for this file was added after Git
+       1.7.11, so if you sometimes use older versions of Git, it's a
+       good idea not to create this file.
 
 $(prefix)/etc/gitconfig::
        System-wide configuration file.

(If your cristal ball tells you what version number will follow 1.7.11
(1.7.12 or 1.8.0?), we can change "after 1.7.11" to "in X". Do you want
to squash it yourself, or shall I resend?

> Ideally, it would be nice if we could do the usual "advise" thing
> by detecting a possible confusion, but I do not offhand see a clever
> way to do so.

I don't see either, since the advice should be given only to people who
use various versions of Git.

Anyway, I don't think we should bother too much with this: it's really
an opt-in feature, Git will never create the new file for you (it will
only write in it if it exists). So, people potentially harmed by this
change are only those who read the documentation. If the documentation
warns them, I think it's sufficient. It's not very different from any
new feature actually.

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