User-wide Git config directory (was Re: [PATCH v2] Let core.excludesfile default to ~/.gitexcludes.)
- From
Matthieu Moy <matthieu.moy@grenoble-inp.fr>
- Date
- Jan 2, 2010, 12:05 UTC
- Message-ID
- <vpqk4w0lnju.fsf_-_@bauges.imag.fr>
- In-Reply-To
- <7vk4w4z1h6.fsf@alter.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com> writes:
Show 13 quoted lines
> Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> writes: > >> Nanako Shiraishi <nanako3@lavabit.com> writes: >> >>> Junio, could you tell us what happened to this thread? >> >> I'm not Junio, but I can try ... >> ... >> So, I dropped the patch until we get closer to a consensus on what the >> default value should be. > > Thanks for status updates. Should we start trying to reach a consensus on > how to move forward, or is it not your itch?
I wouldn't say it's not my itch. But I'm not sure I'm the best person to do the job (job = comming close to a consensus, not writting the code, which shouldn't be hard). Still, I can at least participate ;-).
> It is not _too_ bad to treat ~/.gitconfig specially and support reading
> from ~/.$SOMEGITTTYNAME/{excludes,attributes} files.Let's throw in some ideas about what ~/$SOMEGITTTYNAME/ could be :
1) ~/.git/ => no, that would clash with people versioning their $HOME.
2) ~/.gitconfig/ => no, there's already a file ~/.gitconfig
3) ~/.gitglobal/ => that's an option.
4) ~/.config/git/ or, if set, $XDG_CONFIG_HOME/git/ (see http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html ) => my prefered one, already discussed in a different context here : http://thread.gmane.org/gmane.comp.version-control.git/135447/focus=135559
Then, there's the question of what to put in this directory. I can see two and a half options:
a) ~/.$SOMEGITTTYNAME/{excludes,attributes} as you propose.a') ~/.$SOMEGITTTYNAME/{ignore,attributes} => I think "ignore" is the
advertized vocabulary most of the time in porcelain, and "excludes"
exists mostly for historical reasons.b) ~/.$SOMEGITTTYNAME/<same thing as the content of $GIT_DIR>, that is: ~/.$SOMEGITTTYNAME/info/exclude ~/.$SOMEGITTTYNAME/info/attributes and perhaps ~/.$SOMEGITTTYNAME/config we could imagine also ~/.$SOMEGITTTYNAME/hooks
If I were really happy with the layout of $GIT_DIR, I'd vote for b) for consistancy. But I'm not _that_ happy with it: why are exclude and attributes not in the same directory as config? why is exclude singular and attributes plural?
So, I dunno.
> We can also add support for ~/.$SOMEGITTYNAME/config and try reading > from it as well, but even if we did so I don't think we should stop > reading from ~/.gitconfig.
Yes, people having a ~/.gitconfig around should be able to continue to use it (for years at least, and most likely forever).
And you're right to present it as a different problem. Perhaps we should solve the problem above before starting debating about this one.
-- Matthieu Moy http://www-verimag.imag.fr/~moy/