{"thread":{"id":"30620","subject":"[RFC] Possibility to choose ~/.config/git/config instead of ~/.gitconfig","startedAt":"2012-05-25T16:15:26Z","lastAt":"2012-05-26T10:59:37Z","messageCount":26,"participants":["nguyenhu@minatec.inpg.fr","Jonathan Nieder","Matthieu Moy","Hilco Wijbenga","Junio C Hamano","Jeff King","Felipe Contreras","Heiko Voigt"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"192167","messageId":"20120525181526.Horde.VibLf3wdC4BPv7AeKacSMiA@webmail.minatec.grenoble-inp.fr","threadId":"30620","inReplyTo":null,"subject":"[RFC] Possibility to choose ~/.config/git/config instead of ~/.gitconfig","fromName":"","fromEmail":"nguyenhu@minatec.inpg.fr","sentAt":"2012-05-25T16:15:26Z","receivedAt":"2012-05-25T16:15:26Z","isPatch":false,"sender":{"key":"nguyenhu@minatec.inpg.fr","avatar":null},"body":"Hello,\n\nAs you know, git stores its configuration in ~/.gitconfig file and in  \nother hidden files at the root of the user's directory.\n\nWe would like to have a configuration directory instead of all these  \nconfiguration files by following the XDG specification because:\n- not a lot of hidden files at the root, so better view\n- one directory per software in ~/.config\n\nWe would like to give to users the possibility to store configuration  \nin ~/.config/git/config file.\n\ngit would store its configuration in ~/.config/git/config file if:\n- this file exists,\n- and ~/.gitconfig file doesn't.\nOtherwise git would store its configuration in ~/.gitconfig as usual.\n\nIf you don't create ~/.config/git/config, there is no change.\n\nWhat do you think about it ?\n\nI will send you a patch today.\n\nThanks,\n\nLucien KONG,\nValentin DUPERRAY,\nHuynh Khoi Nguyen NGUYEN,\nThomas NGUY,\nFranck JONAS\n\nGrenoble INP ENSIMAG\n"},{"id":"192169","messageId":"20120525170159.GA4086@burratino","threadId":"30620","inReplyTo":"20120525181526.Horde.VibLf3wdC4BPv7AeKacSMiA@webmail.minatec.grenoble-inp.fr","subject":"Re: [RFC] Possibility to choose ~/.config/git/config instead of ~/.gitconfig","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2012-05-25T17:01:59Z","receivedAt":"2012-05-25T17:01:59Z","isPatch":false,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Hi,\n\nnguyenhu@minatec.inpg.fr wrote:\n\n> As you know, git stores its configuration in ~/.gitconfig file and\n> in other hidden files at the root of the user's directory.\n[...]\n> git would store its configuration in ~/.config/git/config file if:\n> - this file exists,\n> - and ~/.gitconfig file doesn't.\n> Otherwise git would store its configuration in ~/.gitconfig as usual.\n\nSounds like a worthwhile goal, so I look forward to the patch. ;-)\n\nWhat other hidden files at the root of the user's directory are you\ntalking about?\n\nCurious,\nJonathan\n"},{"id":"192172","messageId":"vpqvcjkrwxj.fsf@bauges.imag.fr","threadId":"30620","inReplyTo":"20120525170159.GA4086@burratino","subject":"Re: [RFC] Possibility to choose ~/.config/git/config instead of ~/.gitconfig","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@grenoble-inp.fr","sentAt":"2012-05-25T17:29:44Z","receivedAt":"2012-05-25T17:29:44Z","isPatch":false,"sender":{"key":"matthieu.moy@grenoble-inp.fr","avatar":"https://gravatar.com/avatar/72c8a2705971a25dfaff23cece15130d405685845d911aedd5667ace277f3fc5?d=mp&s=160"},"body":"Jonathan Nieder <jrnieder@gmail.com> writes:\n\n> What other hidden files at the root of the user's directory are you\n> talking about?\n\nA typical user configuration (or at least mine ;-) ) can include:\n\n[core]\n\texcludesfile = ~/.gitignore\n\tattributesfile = ~/.gitattributes\n\nNot having a default value for these two variables is a bit painful. For\nexample, when I teach newbies not to version their *~ backup files, I'd\nlike to grab their keyboard and type for them\n\n  echo '*~' >> ~/.gitignore\n\nbut right now, it takes a bit more time than that (which multiplied by\n35 students in a room is not negligible ;-) ).\n\nActually, I now remember trying to find a default value some time ago:\n\n  http://thread.gmane.org/gmane.comp.version-control.git/133343\n\nThe conclusion essentially boiled down to \"let's drop the patch until\nthere's a clear consensus on what the default value should be\", and\n\"don't default to ~/.gitsomething, because it will be painful to migrate\nto a user config directory later\".\n\nOnce it's official that the configuration is in stg like ~/.config/git/,\nwe can start thinking about a default value for core.excludesfile and\ncore.attributesfile, in the same directory (note: we're just talking\nabout default values here, so users having set the variable explicitely\nwon't be affected by the change).\n\n-- \nMatthieu Moy\nhttp://www-verimag.imag.fr/~moy/\n"},{"id":"192174","messageId":"CAE1pOi0eY2=eNzuTUVGmHuvfGWvxoXSJUADWr0CfPpVe5ktxow@mail.gmail.com","threadId":"30620","inReplyTo":"20120525181526.Horde.VibLf3wdC4BPv7AeKacSMiA@webmail.minatec.grenoble-inp.fr","subject":"Re: [RFC] Possibility to choose ~/.config/git/config instead of ~/.gitconfig","fromName":"Hilco Wijbenga","fromEmail":"hilco.wijbenga@gmail.com","sentAt":"2012-05-25T17:31:24Z","receivedAt":"2012-05-25T17:31:24Z","isPatch":false,"sender":{"key":"hilco.wijbenga@gmail.com","avatar":null},"body":"On 25 May 2012 09:15,  <nguyenhu@minatec.inpg.fr> wrote:\n> Hello,\n>\n> As you know, git stores its configuration in ~/.gitconfig file and in other\n> hidden files at the root of the user's directory.\n>\n> We would like to have a configuration directory instead of all these\n> configuration files by following the XDG specification because:\n> - not a lot of hidden files at the root, so better view\n> - one directory per software in ~/.config\n>\n> We would like to give to users the possibility to store configuration in\n> ~/.config/git/config file.\n\nThis is, of course, highly OS dependent. Ironically, I'd say we need a\nsetting in .gitconfig for it. :-)\n\nThere is also /etc(/default|/sysconfig|)/git/config to consider\n(perhaps for some settings that should be the same for everyone).\nBetter yet, it would be nice if at least some settings could be part\nof the repository itself (whitespace handling e.g.).\n\n> git would store its configuration in ~/.config/git/config file if:\n> - this file exists,\n> - and ~/.gitconfig file doesn't.\n> Otherwise git would store its configuration in ~/.gitconfig as usual.\n>\n> If you don't create ~/.config/git/config, there is no change.\n>\n> What do you think about it ?\n>\n> I will send you a patch today.\n>\n> Thanks,\n>\n> Lucien KONG,\n> Valentin DUPERRAY,\n> Huynh Khoi Nguyen NGUYEN,\n> Thomas NGUY,\n> Franck JONAS\n>\n> Grenoble INP ENSIMAG\n>\n>\n> --\n> To unsubscribe from this list: send the line \"unsubscribe git\" in\n> the body of a message to majordomo@vger.kernel.org\n> More majordomo info at  http://vger.kernel.org/majordomo-info.html\n"},{"id":"192176","messageId":"20120525174237.GA4267@burratino","threadId":"30620","inReplyTo":"CAE1pOi0eY2=eNzuTUVGmHuvfGWvxoXSJUADWr0CfPpVe5ktxow@mail.gmail.com","subject":"Re: [RFC] Possibility to choose ~/.config/git/config instead of ~/.gitconfig","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2012-05-25T17:42:37Z","receivedAt":"2012-05-25T17:42:37Z","isPatch":false,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Hi Hilco,\n\nHilco Wijbenga wrote:\n\n> This is, of course, highly OS dependent. Ironically, I'd say we need a\n> setting in .gitconfig for it. :-)\n>\n> There is also /etc(/default|/sysconfig|)/git/config to consider\n> (perhaps for some settings that should be the same for everyone).\n> Better yet, it would be nice if at least some settings could be part\n> of the repository itself (whitespace handling e.g.).\n\nThe FILES section of git-config(1) might leave you happier. :)\n\nRegarding $GIT_DIR/config, it says \"The filename is of course relative\nto the repository root, not the working directory.\".  Is this out of\ndate?  (Cc-ing Peff and Duy.)\n\nJonathan\n"},{"id":"192177","messageId":"20120525174448.GB4267@burratino","threadId":"30620","inReplyTo":"vpqvcjkrwxj.fsf@bauges.imag.fr","subject":"Re: [RFC] Possibility to choose ~/.config/git/config instead of ~/.gitconfig","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2012-05-25T17:44:49Z","receivedAt":"2012-05-25T17:44:49Z","isPatch":false,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Matthieu Moy wrote:\n> Jonathan Nieder <jrnieder@gmail.com> writes:\n\n>> What other hidden files at the root of the user's directory are you\n>> talking about?\n>\n> A typical user configuration (or at least mine ;-) ) can include:\n>\n> [core]\n> \texcludesfile = ~/.gitignore\n> \tattributesfile = ~/.gitattributes\n\nAh, right, this line from .gitconfig: ;-)\n\n\t[core] excludesfile=~/.config/gitexcludes\n\n[...]\n> Actually, I now remember trying to find a default value some time ago:\n>\n>   http://thread.gmane.org/gmane.comp.version-control.git/133343\n>\n> The conclusion essentially boiled down to \"let's drop the patch until\n> there's a clear consensus on what the default value should be\", and\n> \"don't default to ~/.gitsomething, because it will be painful to migrate\n> to a user config directory later\".\n>\n> Once it's official that the configuration is in stg like ~/.config/git/,\n> we can start thinking about a default value for core.excludesfile and\n> core.attributesfile, in the same directory (note: we're just talking\n> about default values here, so users having set the variable explicitely\n> won't be affected by the change).\n\nMakes sense to me.\n\nThanks,\nJonathan\n"},{"id":"192178","messageId":"CAE1pOi3qSEY=Dj-Fqj+=anULVmCdsm72_k+B0SpdGiCO3u7L9A@mail.gmail.com","threadId":"30620","inReplyTo":"20120525174237.GA4267@burratino","subject":"Re: [RFC] Possibility to choose ~/.config/git/config instead of ~/.gitconfig","fromName":"Hilco Wijbenga","fromEmail":"hilco.wijbenga@gmail.com","sentAt":"2012-05-25T17:47:50Z","receivedAt":"2012-05-25T17:47:50Z","isPatch":false,"sender":{"key":"hilco.wijbenga@gmail.com","avatar":null},"body":"On 25 May 2012 10:42, Jonathan Nieder <jrnieder@gmail.com> wrote:\n> Hi Hilco,\n>\n> Hilco Wijbenga wrote:\n>\n>> This is, of course, highly OS dependent. Ironically, I'd say we need a\n>> setting in .gitconfig for it. :-)\n>>\n>> There is also /etc(/default|/sysconfig|)/git/config to consider\n>> (perhaps for some settings that should be the same for everyone).\n>> Better yet, it would be nice if at least some settings could be part\n>> of the repository itself (whitespace handling e.g.).\n>\n> The FILES section of git-config(1) might leave you happier. :)\n\nIndeed!\n\n> Regarding $GIT_DIR/config, it says \"The filename is of course relative\n> to the repository root, not the working directory.\".  Is this out of\n> date?  (Cc-ing Peff and Duy.)\n\nI'm sure it's not. Somehow, I had gotten it in my head that this\nwasn't possible. I am going to start using this right away. :-)\nThanks!\n"},{"id":"192181","messageId":"vpqipfkrvsx.fsf@bauges.imag.fr","threadId":"30620","inReplyTo":"20120525174237.GA4267@burratino","subject":"Re: [RFC] Possibility to choose ~/.config/git/config instead of ~/.gitconfig","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@grenoble-inp.fr","sentAt":"2012-05-25T17:54:06Z","receivedAt":"2012-05-25T17:54:06Z","isPatch":false,"sender":{"key":"matthieu.moy@grenoble-inp.fr","avatar":"https://gravatar.com/avatar/72c8a2705971a25dfaff23cece15130d405685845d911aedd5667ace277f3fc5?d=mp&s=160"},"body":"Jonathan Nieder <jrnieder@gmail.com> writes:\n\n> Regarding $GIT_DIR/config, it says \"The filename is of course relative\n> to the repository root, not the working directory.\".  Is this out of\n> date?  (Cc-ing Peff and Duy.)\n\nThis is a per-repository, but not \"part of the repository\" in the sense\n\"files tracked by Git\" (i.e. it's not fetched by git clone).\n\nHaving a $GIT_WORKTREE/.gitconfig file would be very nice, but raises a\nlot of security issues, so it's a much larger project (define which\nconfiguration values are allowed there, possibly take them into account\nat clone time, i.e. before checking out the files, and so on). Most\nlikely out of the scope of my students' project ;-).\n\n-- \nMatthieu Moy\nhttp://www-verimag.imag.fr/~moy/\n"},{"id":"192184","messageId":"20120525181204.GA4491@burratino","threadId":"30620","inReplyTo":"CAE1pOi3qSEY=Dj-Fqj+=anULVmCdsm72_k+B0SpdGiCO3u7L9A@mail.gmail.com","subject":"[PATCH] config doc: remove confusion about relative GIT_DIR from FILES section","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2012-05-25T18:12:04Z","receivedAt":"2012-05-25T18:12:04Z","isPatch":true,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"From the FILES section of the git-config(1) manual:\n\n\t$GIT_DIR/config::\n\t\tRepository specific configuration file. (The filename is\n\t\tof course relative to the repository root, not the working\n\t\tdirectory.)\n\nThat's confusing because $GIT_DIR really is relative to the working\ndirectory.\n\n\t$ GIT_DIR=.git GIT_EDITOR='pwd; echo editing'\n\t$ export GIT_DIR GIT_EDITOR\n\t$ git config --edit --local\n\t/home/jrn/src/git/Documentation\n\tediting .git/config\n\nIt turns out that the comment is a remnant from older days when the\nheading said \".git/config\" (which is indeed relative to the top of the\nworktree).\n\nIt was only when the heading was changed to refer more precisely to\n<git dir>/config (see v1.5.3.2~18, AsciiDoc tweak to avoid leading\ndot, 2007-09-14) that the parenthesis stopped making sense.  Remove\nit.\n\nSigned-off-by: Jonathan Nieder <jrnieder@gmail.com>\n---\nHilco Wijbenga wrote:\n> On 25 May 2012 10:42, Jonathan Nieder <jrnieder@gmail.com> wrote:\n\n>> Regarding $GIT_DIR/config, it says \"The filename is of course relative\n>> to the repository root, not the working directory.\".  Is this out of\n>> date?  (Cc-ing Peff and Duy.)\n>\n> I'm sure it's not.\n\nYou're right --- the current wording never made sense and is not an\nexample of accurate documentation going stale with later behavior\nchanges as I had suspected.  Sorry for the noise.\n\nThanks,\nJonathan\n\n Documentation/git-config.txt |    4 +---\n 1 file changed, 1 insertion(+), 3 deletions(-)\n\ndiff --git a/Documentation/git-config.txt b/Documentation/git-config.txt\nindex 3f5d216a..d9463cb3 100644\n--- a/Documentation/git-config.txt\n+++ b/Documentation/git-config.txt\n@@ -198,9 +198,7 @@ If not set explicitly with '--file', there are three files where\n 'git config' will search for configuration options:\n \n $GIT_DIR/config::\n-\tRepository specific configuration file. (The filename is\n-\tof course relative to the repository root, not the working\n-\tdirectory.)\n+\tRepository specific configuration file.\n \n ~/.gitconfig::\n \tUser-specific configuration file. Also called \"global\"\n-- \n1.7.10\n"},{"id":"192185","messageId":"7v4nr4t9gc.fsf@alter.siamese.dyndns.org","threadId":"30620","inReplyTo":"CAE1pOi0eY2=eNzuTUVGmHuvfGWvxoXSJUADWr0CfPpVe5ktxow@mail.gmail.com","subject":"Re: [RFC] Possibility to choose ~/.config/git/config instead of ~/.gitconfig","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2012-05-25T18:13:55Z","receivedAt":"2012-05-25T18:13:55Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Hilco Wijbenga <hilco.wijbenga@gmail.com> writes:\n\n> This is, of course, highly OS dependent. Ironically, I'd say we need a\n> setting in .gitconfig for it. :-)\n>\n> There is also /etc(/default|/sysconfig|)/git/config to consider\n> (perhaps for some settings that should be the same for everyone).\n> Better yet, it would be nice if at least some settings could be part\n> of the repository itself (whitespace handling e.g.).\n\nAs long as we make sure we have knobs for distro packagers and people\nbuilding from the source to twist so that they can easily name the places\nthey want us to read from and write to, what we decide in-tree does not\nmatter.  We default to ~/.gitconfig and /etc/gitconfig as before, and that\nis perfectly fine.  We already have ETC_GITCONFIG, so the only thing it\nmight be nicer to add is the build configurability of ~/.gitconfig file,\nno?\n"},{"id":"192186","messageId":"7vwr40rukg.fsf@alter.siamese.dyndns.org","threadId":"30620","inReplyTo":"CAE1pOi3qSEY=Dj-Fqj+=anULVmCdsm72_k+B0SpdGiCO3u7L9A@mail.gmail.com","subject":"Re: [RFC] Possibility to choose ~/.config/git/config instead of ~/.gitconfig","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2012-05-25T18:20:47Z","receivedAt":"2012-05-25T18:20:47Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Hilco Wijbenga <hilco.wijbenga@gmail.com> writes:\n\n>> Regarding $GIT_DIR/config, it says \"The filename is of course relative\n>> to the repository root, not the working directory.\".  Is this out of\n>> date?  (Cc-ing Peff and Duy.)\n\nIt is only worded awkwardly, I think.  The above is merely trying to say\nthat you do not place 'config' anywhere in the working tree; in other\nwords, \"repository\" in the above refers to GIT_DIR, and the \"root\" means\nnot inside refs/, objects/, or anywhere, just next to index, HEAD, etc.\n"},{"id":"192187","messageId":"20120525182558.GC4491@burratino","threadId":"30620","inReplyTo":"7v4nr4t9gc.fsf@alter.siamese.dyndns.org","subject":"Re: [RFC] Possibility to choose ~/.config/git/config instead of ~/.gitconfig","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2012-05-25T18:25:58Z","receivedAt":"2012-05-25T18:25:58Z","isPatch":false,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Junio C Hamano wrote:\n\n>                     We already have ETC_GITCONFIG, so the only thing it\n> might be nicer to add is the build configurability of ~/.gitconfig file,\n> no?\n\nIf we were trying to solve a different problem (\"my filesystem does\nnot support filenames starting with '.' with more than three\ncharacters afterward\") then I would agree, but in this case no.  HOME\ndirectories are often shared between multiple machines, even machines\nwith different operating systems.\n\nIf I understand correctly, the proposal that started this thread was\nto give people a chance to tidy their HOME directory by moving\npersonal git configuration under ~/.config/git/.  Git would detect it\nautomatically.  I think the main complication would be phasing in the\nchange slowly and carefully so people helping each other with git\nproblems do not get confused:\n\n  \"Why is this setting not taking effect?  It's in ~/.config/gitconfig\n   just like it should be.  Oh, what git version do you have?\"\n\nand\n\n  \"Is there no .gitconfig?  Okay, we can assume all the default\n   settings are in use.  Now let's...\"\n\nThat's why I'd be happy to see how an initial patch approaches the\ntransition, to see how it can be improved to happen smoothly.\n\nJonathan\n"},{"id":"192188","messageId":"7vsjeortwu.fsf@alter.siamese.dyndns.org","threadId":"30620","inReplyTo":"20120525182558.GC4491@burratino","subject":"Re: [RFC] Possibility to choose ~/.config/git/config instead of ~/.gitconfig","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2012-05-25T18:34:57Z","receivedAt":"2012-05-25T18:34:57Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jonathan Nieder <jrnieder@gmail.com> writes:\n\n> If I understand correctly, the proposal that started this thread was\n> to give people a chance to tidy their HOME directory by moving\n> personal git configuration under ~/.config/git/.  \n\nSo it is exactly \"I do not want ~/.gitconfig, I want ~/.config/git\", no?\n\nThat is something distro should be able to decide.\n"},{"id":"192190","messageId":"20120525184408.GA4740@burratino","threadId":"30620","inReplyTo":"7vsjeortwu.fsf@alter.siamese.dyndns.org","subject":"Re: [RFC] Possibility to choose ~/.config/git/config instead of ~/.gitconfig","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2012-05-25T18:44:09Z","receivedAt":"2012-05-25T18:44:09Z","isPatch":false,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Junio C Hamano wrote:\n> Jonathan Nieder <jrnieder@gmail.com> writes:\n\n>> If I understand correctly, the proposal that started this thread was\n>> to give people a chance to tidy their HOME directory by moving\n>> personal git configuration under ~/.config/git/.  \n>\n> So it is exactly \"I do not want ~/.gitconfig, I want ~/.config/git\", no?\n>\n> That is something distro should be able to decide.\n\nExcept that there is nothing distro-specific about it.  Do you really\nwant the config file to have a different name depending on whether one\nis using Debian, Fedora, Mac OS X, Gentoo, one of the various builds of\ngit on Windows, Solaris, ...?\n\nBesides, with my distro package maintainer hat on, I can tell you that\nswitching the config file to ~/.config/git and not reading\n~/.gitconfig would be a complete nonstarter.  That would mean that the\nexisting user configuration for everyone would just seem to disappear.\n\nOnce the code to read both files is written, why would one want that\nto be distro-specific and not something shared?\n\nHoping that clarifies a little,\nJonathan\n"},{"id":"192191","messageId":"7vobpcrstn.fsf@alter.siamese.dyndns.org","threadId":"30620","inReplyTo":"20120525184408.GA4740@burratino","subject":"Re: [RFC] Possibility to choose ~/.config/git/config instead of ~/.gitconfig","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2012-05-25T18:58:28Z","receivedAt":"2012-05-25T18:58:28Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jonathan Nieder <jrnieder@gmail.com> writes:\n\n>> So it is exactly \"I do not want ~/.gitconfig, I want ~/.config/git\", no?\n>>\n>> That is something distro should be able to decide.\n>\n> Except that there is nothing distro-specific about it.  Do you really\n> want the config file to have a different name depending on whether one\n> is using Debian, Fedora,...\n\nNot me personally.  But distros want to do that, it's their choice.\n\n> Besides, with my distro package maintainer hat on, I can tell you that\n> switching the config file to ~/.config/git and not reading\n> ~/.gitconfig would be a complete nonstarter.\n\nAbsolutely.  So don't choose to deliberately introduce backward\nincompatibliity.  Problem solved.\n\nWhy is it bad to keep using ~/.gitconfig in the first place?  The UNIX\nconvention to exclude names that begin with dot is not working for you?\n"},{"id":"192192","messageId":"vpqipfkozjm.fsf@bauges.imag.fr","threadId":"30620","inReplyTo":"20120525184408.GA4740@burratino","subject":"Re: [RFC] Possibility to choose ~/.config/git/config instead of ~/.gitconfig","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@grenoble-inp.fr","sentAt":"2012-05-25T19:01:33Z","receivedAt":"2012-05-25T19:01:33Z","isPatch":false,"sender":{"key":"matthieu.moy@grenoble-inp.fr","avatar":"https://gravatar.com/avatar/72c8a2705971a25dfaff23cece15130d405685845d911aedd5667ace277f3fc5?d=mp&s=160"},"body":"Jonathan Nieder <jrnieder@gmail.com> writes:\n\n> Junio C Hamano wrote:\n>> Jonathan Nieder <jrnieder@gmail.com> writes:\n>\n>>> If I understand correctly, the proposal that started this thread was\n>>> to give people a chance to tidy their HOME directory by moving\n>>> personal git configuration under ~/.config/git/.  \n>>\n>> So it is exactly \"I do not want ~/.gitconfig, I want ~/.config/git\", no?\n>>\n>> That is something distro should be able to decide.\n>\n> Except that there is nothing distro-specific about it.  Do you really\n> want the config file to have a different name depending on whether one\n> is using Debian, Fedora, Mac OS X, Gentoo, one of the various builds of\n> git on Windows, Solaris, ...?\n\nI agree. Please don't encourage distro to make incompatible\nconfiguration changes.\n\n-- \nMatthieu Moy\nhttp://www-verimag.imag.fr/~moy/\n"},{"id":"192193","messageId":"vpq396ooyzd.fsf@bauges.imag.fr","threadId":"30620","inReplyTo":"7vobpcrstn.fsf@alter.siamese.dyndns.org","subject":"Re: [RFC] Possibility to choose ~/.config/git/config instead of ~/.gitconfig","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@grenoble-inp.fr","sentAt":"2012-05-25T19:13:42Z","receivedAt":"2012-05-25T19:13:42Z","isPatch":false,"sender":{"key":"matthieu.moy@grenoble-inp.fr","avatar":"https://gravatar.com/avatar/72c8a2705971a25dfaff23cece15130d405685845d911aedd5667ace277f3fc5?d=mp&s=160"},"body":"Junio C Hamano <gitster@pobox.com> writes:\n\n>> Besides, with my distro package maintainer hat on, I can tell you that\n>> switching the config file to ~/.config/git and not reading\n>> ~/.gitconfig would be a complete nonstarter.\n>\n> Absolutely.  So don't choose to deliberately introduce backward\n> incompatibliity.  Problem solved.\n\nIt doesn't have to be backward incompatible. The proposal is to _allow_\nusers to have a ~/.config/git/config file, not to _force_ them to have\none.\n\nIf Git reads both files, then ~/.gitconfig lovers can continue with it,\nand are not affected.\n\n> Why is it bad to keep using ~/.gitconfig in the first place?  The UNIX\n> convention to exclude names that begin with dot is not working for you?\n\nThe \"It's a convention\" argument doesn't work here. XDG is also a rather\nwidely used convention these days, so \"why not follow the convention\"\ncan be used both in favor of ~/.gitconfig or ~/.config/git/config.\n\n~/.gitconfig alone would not be a huge problem, although personnally\nhate it already. I like to version my handwritten configuration files,\nbut I don't want my $HOME to be a git repository. I already have a\n~/etc/ directory with my configuration files in it, and ~/.gitconfig is\nbasically a symbolic link. I wouldn't have to re-structure my $HOME if I\nhad a structured and standard configuration directory like ~/.config.\n\nNow, the real issue is that we're starting to have several user-wide\nconfig files (core.excludesfile, core.attributesfile, maybe one day\nwe'll want others like user-wide hooks?), and having multiple\n~/.git<something> really feels wrong. Just like we have /etc/<file> for\napplications that have only one configuration file, and /etc/<directory>\nfor ones who need more, it seems sensible to have a configuration\ndirectory for a user, not just a set of configuration files in $HOME.\n\n-- \nMatthieu Moy\nhttp://www-verimag.imag.fr/~moy/\n"},{"id":"192194","messageId":"20120525191701.GA4944@burratino","threadId":"30620","inReplyTo":"7vobpcrstn.fsf@alter.siamese.dyndns.org","subject":"Re: [RFC] Possibility to choose ~/.config/git/config instead of ~/.gitconfig","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2012-05-25T19:17:01Z","receivedAt":"2012-05-25T19:17:01Z","isPatch":false,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Junio C Hamano wrote:\n\n> Why is it bad to keep using ~/.gitconfig in the first place?  The UNIX\n> convention to exclude names that begin with dot is not working for you?\n\nOk, now you're making more sense. :)\n\nI don't think anyone was proposing dropping support for .gitconfig.\nBut:\n\nAny patch to add support for ~/.config/git should of course take care\nto include a rationale that answers this question.  (I am guessing\nthat putting all user git configuration in one directory is part of\nthe goal, and separating temporary files like ~/.fontconfig/*.cache*\nfrom configuration files like ~/.mutt/muttrc is another part.)\n\nCiao,\nJonathan\n"},{"id":"192196","messageId":"vpqvcjknjo0.fsf@bauges.imag.fr","threadId":"30620","inReplyTo":"20120525191701.GA4944@burratino","subject":"Re: [RFC] Possibility to choose ~/.config/git/config instead of ~/.gitconfig","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@grenoble-inp.fr","sentAt":"2012-05-25T19:29:51Z","receivedAt":"2012-05-25T19:29:51Z","isPatch":false,"sender":{"key":"matthieu.moy@grenoble-inp.fr","avatar":"https://gravatar.com/avatar/72c8a2705971a25dfaff23cece15130d405685845d911aedd5667ace277f3fc5?d=mp&s=160"},"body":"Jonathan Nieder <jrnieder@gmail.com> writes:\n\n> I am guessing\n> that putting all user git configuration in one directory is part of\n> the goal, and separating temporary files like ~/.fontconfig/*.cache*\n> from configuration files like ~/.mutt/muttrc is another part.\n\nThat's another good thing with XDG (~/.config Vs ~/.cache/ for example),\nbut I don't think Git would have anything user-wide that would not be\nconfiguration.\n\n-- \nMatthieu Moy\nhttp://www-verimag.imag.fr/~moy/\n"},{"id":"192197","messageId":"20120525193507.GA5184@burratino","threadId":"30620","inReplyTo":"vpqvcjknjo0.fsf@bauges.imag.fr","subject":"Re: [RFC] Possibility to choose ~/.config/git/config instead of ~/.gitconfig","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2012-05-25T19:35:07Z","receivedAt":"2012-05-25T19:35:07Z","isPatch":false,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Matthieu Moy wrote:\n\n> That's another good thing with XDG (~/.config Vs ~/.cache/ for example),\n> but I don't think Git would have anything user-wide that would not be\n> configuration.\n\nOf course, but your home directory that you read with \"ls -A\" does.\nPutting configuration in ~/.config makes it easier to find amid all\nthat noise.\n\nThat said, as Junio wrote before[1]:\n\n> It is not _too_ bad to treat ~/.gitconfig specially and support reading\n> from ~/.$SOMEGITTTYNAME/{excludes,attributes} files.\n\nThat's what vim does --- its main configuration file is ~/.vimrc, and\nthere are also some supporting files in ~/.config/vim/.\n\nWouldn't that be a good place to start?\n\nJonathan\n\n[1] http://thread.gmane.org/gmane.comp.version-control.git/133343/focus=135921\n"},{"id":"192198","messageId":"20120525193724.GB5184@burratino","threadId":"30620","inReplyTo":"20120525193507.GA5184@burratino","subject":"Re: [RFC] Possibility to choose ~/.config/git/config instead of ~/.gitconfig","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2012-05-25T19:37:24Z","receivedAt":"2012-05-25T19:37:24Z","isPatch":false,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Jonathan Nieder wrote:\n>            as Junio wrote before[1]:\n\n>> It is not _too_ bad to treat ~/.gitconfig specially and support reading\n>> from ~/.$SOMEGITTTYNAME/{excludes,attributes} files.\n>\n> That's what vim does --- its main configuration file is ~/.vimrc, and\n> there are also some supporting files in ~/.config/vim/.\n>\n> Wouldn't that be a good place to start?\n\nCorrection: I meant \"also some supporting files in ~/.vim/\".\n\nSorry for the noise.\nJonathan\n"},{"id":"192199","messageId":"vpqr4u8nj7m.fsf@bauges.imag.fr","threadId":"30620","inReplyTo":"20120525193507.GA5184@burratino","subject":"Re: [RFC] Possibility to choose ~/.config/git/config instead of ~/.gitconfig","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@grenoble-inp.fr","sentAt":"2012-05-25T19:39:41Z","receivedAt":"2012-05-25T19:39:41Z","isPatch":false,"sender":{"key":"matthieu.moy@grenoble-inp.fr","avatar":"https://gravatar.com/avatar/72c8a2705971a25dfaff23cece15130d405685845d911aedd5667ace277f3fc5?d=mp&s=160"},"body":"Jonathan Nieder <jrnieder@gmail.com> writes:\n\n> Matthieu Moy wrote:\n>\n>> That's another good thing with XDG (~/.config Vs ~/.cache/ for example),\n>> but I don't think Git would have anything user-wide that would not be\n>> configuration.\n>\n> Of course, but your home directory that you read with \"ls -A\" does.\n> Putting configuration in ~/.config makes it easier to find amid all\n> that noise.\n\nYes. My sentence above was just replying to \"separating temporary files\"\n(i.e. putting stuff in ~/.cache/), I over-quoted your message.\n\n-- \nMatthieu Moy\nhttp://www-verimag.imag.fr/~moy/\n"},{"id":"192202","messageId":"20120525200631.GA4364@sigill.intra.peff.net","threadId":"30620","inReplyTo":"20120525181204.GA4491@burratino","subject":"Re: [PATCH] config doc: remove confusion about relative GIT_DIR from FILES section","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2012-05-25T20:06:31Z","receivedAt":"2012-05-25T20:06:31Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Fri, May 25, 2012 at 01:12:04PM -0500, Jonathan Nieder wrote:\n\n> From the FILES section of the git-config(1) manual:\n> \n> \t$GIT_DIR/config::\n> \t\tRepository specific configuration file. (The filename is\n> \t\tof course relative to the repository root, not the working\n> \t\tdirectory.)\n> \n> That's confusing because $GIT_DIR really is relative to the working\n> directory.\n> \n> \t$ GIT_DIR=.git GIT_EDITOR='pwd; echo editing'\n> \t$ export GIT_DIR GIT_EDITOR\n> \t$ git config --edit --local\n> \t/home/jrn/src/git/Documentation\n> \tediting .git/config\n> \n> It turns out that the comment is a remnant from older days when the\n> heading said \".git/config\" (which is indeed relative to the top of the\n> worktree).\n> \n> It was only when the heading was changed to refer more precisely to\n> <git dir>/config (see v1.5.3.2~18, AsciiDoc tweak to avoid leading\n> dot, 2007-09-14) that the parenthesis stopped making sense.  Remove\n> it.\n\nThanks for digging in the history for the answer.\n\n> diff --git a/Documentation/git-config.txt b/Documentation/git-config.txt\n> index 3f5d216a..d9463cb3 100644\n> --- a/Documentation/git-config.txt\n> +++ b/Documentation/git-config.txt\n> @@ -198,9 +198,7 @@ If not set explicitly with '--file', there are three files where\n>  'git config' will search for configuration options:\n>  \n>  $GIT_DIR/config::\n> -\tRepository specific configuration file. (The filename is\n> -\tof course relative to the repository root, not the working\n> -\tdirectory.)\n> +\tRepository specific configuration file.\n>  \n>  ~/.gitconfig::\n>  \tUser-specific configuration file. Also called \"global\"\n\nThis makes a lot more sense to me.\n\nAcked-by: Jeff King <peff@peff.net>\n\n-Peff\n"},{"id":"192204","messageId":"20120525201123.GB4364@sigill.intra.peff.net","threadId":"30620","inReplyTo":"vpqipfkrvsx.fsf@bauges.imag.fr","subject":"Re: [RFC] Possibility to choose ~/.config/git/config instead of ~/.gitconfig","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2012-05-25T20:11:23Z","receivedAt":"2012-05-25T20:11:23Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Fri, May 25, 2012 at 07:54:06PM +0200, Matthieu Moy wrote:\n\n> Having a $GIT_WORKTREE/.gitconfig file would be very nice, but raises a\n> lot of security issues, so it's a much larger project (define which\n> configuration values are allowed there, possibly take them into account\n> at clone time, i.e. before checking out the files, and so on). Most\n> likely out of the scope of my students' project ;-).\n\nYes, I have proposed it in multiple forms, and the discussion always\nends in \"gross, it's too complex\".\n\nIf you really want to do it, the recommended way at this point is:\n\n  # review for any issues (1)\n  less .gitconfig\n\n  # assuming it's OK, copy into place (2)\n  cp .gitconfig .git/config-from-upstream\n\n  # include it\n  git config include.path config-from-upstream\n\nAnd then repeat steps (1) and (2) whenever you want to update from\nupstream. That fixes not only the security issues, but also means that\nyou won't accidentally drop back to some antique bogus config when you\n\"git checkout $some_old_version\".\n\n-Peff\n"},{"id":"192233","messageId":"CAMP44s32GKrmXDND3_iO6CTOgHTfeuBeXYEOjcET5bBZ067pFQ@mail.gmail.com","threadId":"30620","inReplyTo":"20120525181526.Horde.VibLf3wdC4BPv7AeKacSMiA@webmail.minatec.grenoble-inp.fr","subject":"Re: [RFC] Possibility to choose ~/.config/git/config instead of ~/.gitconfig","fromName":"Felipe Contreras","fromEmail":"felipe.contreras@gmail.com","sentAt":"2012-05-26T10:45:52Z","receivedAt":"2012-05-26T10:45:52Z","isPatch":false,"sender":{"key":"felipe.contreras@gmail.com","avatar":"https://avatars.githubusercontent.com/u/8358?v=4"},"body":"On Fri, May 25, 2012 at 6:15 PM,  <nguyenhu@minatec.inpg.fr> wrote:\n\n> As you know, git stores its configuration in ~/.gitconfig file and in other\n> hidden files at the root of the user's directory.\n>\n> We would like to have a configuration directory instead of all these\n> configuration files by following the XDG specification because:\n> - not a lot of hidden files at the root, so better view\n> - one directory per software in ~/.config\n>\n> We would like to give to users the possibility to store configuration in\n> ~/.config/git/config file.\n\nI like this, but it shouldn't be \"~/.config\", it should be $XDG_CONFIG_HOME.\n\n-- \nFelipe Contreras\n"},{"id":"192234","messageId":"20120526105936.GA37540@book.hvoigt.net","threadId":"30620","inReplyTo":"CAMP44s32GKrmXDND3_iO6CTOgHTfeuBeXYEOjcET5bBZ067pFQ@mail.gmail.com","subject":"Re: [RFC] Possibility to choose ~/.config/git/config instead of ~/.gitconfig","fromName":"Heiko Voigt","fromEmail":"hvoigt@hvoigt.net","sentAt":"2012-05-26T10:59:37Z","receivedAt":"2012-05-26T10:59:37Z","isPatch":false,"sender":{"key":"hvoigt@hvoigt.net","avatar":"https://avatars.githubusercontent.com/u/184958?v=4"},"body":"Hi,\n\nOn Sat, May 26, 2012 at 12:45:52PM +0200, Felipe Contreras wrote:\n> On Fri, May 25, 2012 at 6:15 PM,  <nguyenhu@minatec.inpg.fr> wrote:\n> \n> > As you know, git stores its configuration in ~/.gitconfig file and in other\n> > hidden files at the root of the user's directory.\n> >\n> > We would like to have a configuration directory instead of all these\n> > configuration files by following the XDG specification because:\n> > - not a lot of hidden files at the root, so better view\n> > - one directory per software in ~/.config\n> >\n> > We would like to give to users the possibility to store configuration in\n> > ~/.config/git/config file.\n> \n> I like this, but it shouldn't be \"~/.config\", it should be $XDG_CONFIG_HOME.\n\nIf we do that what about a fallback to .config for operating systems\nthat do not have XDG? E.g. Git for Windows would then also be able to\nbenefit from that.\n\nCheers Heiko\n"}]}