{"thread":{"id":"46924","subject":"is there a truly compelling rationale for .git/info/exclude?","startedAt":"2017-10-06T10:14:41Z","lastAt":"2017-10-13T07:05:42Z","messageCount":10,"participants":["rpjday@crashcourse.ca","Junio C Hamano","Kaartic Sivaraam","Robert P. J. Day","Jonathan Nieder","brian m. carlson","Steinar Bang","Johannes Schindelin","Jeff King"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"329867","messageId":"20171006061434.Horde.16MqZ-fejqXm6BLpL7prK1K@crashcourse.ca","threadId":"46924","inReplyTo":null,"subject":"is there a truly compelling rationale for .git/info/exclude?","fromName":"","fromEmail":"rpjday@crashcourse.ca","sentAt":"2017-10-06T10:14:34Z","receivedAt":"2017-10-06T10:14:41Z","isPatch":false,"sender":{"key":"rpjday@crashcourse.ca","avatar":"https://avatars.githubusercontent.com/u/226084077?v=4"},"body":"   currently having a discussion with ben straub of \"pro git\" notoriety,\nand he and i seem to agree that there's not much value in registering\nignore patterns in a repo-specific .git/info/exclude file.\n\n   on the one hand, the .gitignore files that come with a repo would\nrepresent (in ben's terminology, which i really like) the \"intrinsic\"\npatterns to be ignored that are related to the basic content of the repo.\n\n   at the other end, users are certainly welcome to add extra patterns\nto be ignored, based purely on the way they work -- perhaps based on\ntheir choice of editor, they might want to exclude *.swp files, or\nif working on a Mac, ignore .DS_Store, and so on, using a\ncore.excludesFile setting.\n\n   and in this funny grey area in between, we have .git/info/exclude,\nto be used for ... what, exactly? the one argument i've come up with\nis the situation where you discover that a repo you've cloned has an\nincomplete set of .gitignore patterns, and while you submit a patch\nfor that to the maintainer, you can temporarily add that pattern\nto .git/info/exclude, and as soon as the patch is accepted, you can\ntoss it.\n\n   but even that isn't a really compelling reason. so what's it for?\n\nrday\n\n\n"},{"id":"329877","messageId":"xmqqmv54v5h6.fsf@gitster.mtv.corp.google.com","threadId":"46924","inReplyTo":"20171006061434.Horde.16MqZ-fejqXm6BLpL7prK1K@crashcourse.ca","subject":"Re: is there a truly compelling rationale for .git/info/exclude?","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2017-10-06T12:13:57Z","receivedAt":"2017-10-06T12:14:04Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"rpjday@crashcourse.ca writes:\n\n>   at the other end, users are certainly welcome to add extra patterns\n> to be ignored, based purely on the way they work -- perhaps based on\n> their choice of editor, they might want to exclude *.swp files, or\n> if working on a Mac, ignore .DS_Store, and so on, using a\n> core.excludesFile setting.\n\nThis is primarily why .git/info/exclude exists.  A user who does not\nuse the same set of tools to work on different projects may not be\nable to use ~/.gitconfig with core.excludesFile pointing at a single\nplace that applies to _all_ repositories the user touches.\n\nAlso, core.excludesFile came a lot later than in-project and\nin-repository exclude list, IIRC.\n\nDon't waste time by seeking a \"compelling\" reason.  A mere \"this is\nthe most expedite way to gain convenience\" back when something was\nintroduced could be an answer, and it is way too late to complain\nabout such a choice anyway.\n"},{"id":"329890","messageId":"1507299524.12554.9.camel@gmail.com","threadId":"46924","inReplyTo":"20171006061434.Horde.16MqZ-fejqXm6BLpL7prK1K@crashcourse.ca","subject":"Re: is there a truly compelling rationale for .git/info/exclude?","fromName":"Kaartic Sivaraam","fromEmail":"kaartic.sivaraam@gmail.com","sentAt":"2017-10-06T14:18:44Z","receivedAt":"2017-10-06T14:19:11Z","isPatch":false,"sender":{"key":"kaartic.sivaraam@gmail.com","avatar":"https://avatars.githubusercontent.com/u/12448084?v=4"},"body":"On Fri, 2017-10-06 at 06:14 -0400, rpjday@crashcourse.ca wrote:\n>    and in this funny grey area in between, we have .git/info/exclude,\n> to be used for ... what, exactly? the one argument i've come up with\n> is the situation where you discover that a repo you've cloned has an\n> incomplete set of .gitignore patterns, and while you submit a patch\n> for that to the maintainer, you can temporarily add that pattern\n> to .git/info/exclude, and as soon as the patch is accepted, you can\n> toss it.\n> \n>    but even that isn't a really compelling reason. so what's it for?\n> \n\nThanks for asking this question. I have long been in the scenario you\njust described above except that I didn't know of .git/info/exclude all\nthese days. I was longing to find if there was a way to ignore files in\n a repo without touching the .gitignore of that repo . Now I have found\none, the \".git/info/exclude\".\n\nThanks, again.\n\n-- \nKaartic\n"},{"id":"329907","messageId":"alpine.LFD.2.21.1710061337300.14079@localhost.localdomain","threadId":"46924","inReplyTo":"xmqqmv54v5h6.fsf@gitster.mtv.corp.google.com","subject":"Re: is there a truly compelling rationale for .git/info/exclude?","fromName":"Robert P. J. Day","fromEmail":"rpjday@crashcourse.ca","sentAt":"2017-10-06T17:39:16Z","receivedAt":"2017-10-06T17:39:24Z","isPatch":false,"sender":{"key":"rpjday@crashcourse.ca","avatar":"https://avatars.githubusercontent.com/u/226084077?v=4"},"body":"On Fri, 6 Oct 2017, Junio C Hamano wrote:\n\n> rpjday@crashcourse.ca writes:\n>\n> >   at the other end, users are certainly welcome to add extra\n> > patterns to be ignored, based purely on the way they work --\n> > perhaps based on their choice of editor, they might want to\n> > exclude *.swp files, or if working on a Mac, ignore .DS_Store, and\n> > so on, using a core.excludesFile setting.\n>\n> This is primarily why .git/info/exclude exists.  A user who does not\n> use the same set of tools to work on different projects may not be\n> able to use ~/.gitconfig with core.excludesFile pointing at a single\n> place that applies to _all_ repositories the user touches.\n>\n> Also, core.excludesFile came a lot later than in-project and\n> in-repository exclude list, IIRC.\n>\n> Don't waste time by seeking a \"compelling\" reason.  A mere \"this is\n> the most expedite way to gain convenience\" back when something was\n> introduced could be an answer, and it is way too late to complain\n> about such a choice anyway.\n\n  perfectly respectable answer ... it tells me that, between\n.gitignore files and core.excludesFile, there's not much left for\n.git/info/exclude to do, except in weird circumstances.\n\nrday\n\n-- \n\n========================================================================\nRobert P. J. Day                                 Ottawa, Ontario, CANADA\n                        http://crashcourse.ca\n\nTwitter:                                       http://twitter.com/rpjday\nLinkedIn:                               http://ca.linkedin.com/in/rpjday\n========================================================================\n"},{"id":"329918","messageId":"20171006192359.GW19555@aiede.mtv.corp.google.com","threadId":"46924","inReplyTo":"alpine.LFD.2.21.1710061337300.14079@localhost.localdomain","subject":"Re: is there a truly compelling rationale for .git/info/exclude?","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2017-10-06T19:23:59Z","receivedAt":"2017-10-06T19:24:10Z","isPatch":false,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Hi,\n\nRobert P. J. Day wrote:\n> On Fri, 6 Oct 2017, Junio C Hamano wrote:\n\n>> Don't waste time by seeking a \"compelling\" reason.  A mere \"this is\n>> the most expedite way to gain convenience\" back when something was\n>> introduced could be an answer, and it is way too late to complain\n>> about such a choice anyway.\n>\n>   perfectly respectable answer ... it tells me that, between\n> .gitignore files and core.excludesFile, there's not much left for\n> .git/info/exclude to do, except in weird circumstances.\n\nI use .git/info/exclude in what I don't consider to be weird\ncircumstances.\n\nBut I am not motivated to say more than that without knowing what my\nanswer is going to be used for.  E.g. is there a part of the\ngitignore(5) man page where such an explanation would make it less\nconfusing and more useful?\n\nThanks,\nJonathan\n"},{"id":"329973","messageId":"20171007212058.676kdlwyxvtw3gi5@genre.crustytoothpaste.net","threadId":"46924","inReplyTo":"alpine.LFD.2.21.1710061337300.14079@localhost.localdomain","subject":"Re: is there a truly compelling rationale for .git/info/exclude?","fromName":"brian m. carlson","fromEmail":"sandals@crustytoothpaste.net","sentAt":"2017-10-07T21:20:58Z","receivedAt":"2017-10-07T21:21:11Z","isPatch":false,"sender":{"key":"sandals@crustytoothpaste.net","avatar":"https://avatars.githubusercontent.com/u/497054?v=4"},"body":"On Fri, Oct 06, 2017 at 01:39:16PM -0400, Robert P. J. Day wrote:\n> On Fri, 6 Oct 2017, Junio C Hamano wrote:\n> > This is primarily why .git/info/exclude exists.  A user who does not\n> > use the same set of tools to work on different projects may not be\n> > able to use ~/.gitconfig with core.excludesFile pointing at a single\n> > place that applies to _all_ repositories the user touches.\n> >\n> > Also, core.excludesFile came a lot later than in-project and\n> > in-repository exclude list, IIRC.\n> >\n> > Don't waste time by seeking a \"compelling\" reason.  A mere \"this is\n> > the most expedite way to gain convenience\" back when something was\n> > introduced could be an answer, and it is way too late to complain\n> > about such a choice anyway.\n> \n>   perfectly respectable answer ... it tells me that, between\n> .gitignore files and core.excludesFile, there's not much left for\n> .git/info/exclude to do, except in weird circumstances.\n\nA place where I use it is in some Vim package repositories that I have\nas submodules of my home directory.  The author of those repositories,\nTim Pope, explicitly does not exclude the helptags output.  I simply\nignore those files using .git/info/exclude.\n\nAnother case is when I install a plugin that lives below a our main\nproduct repository at work.  I can simply exclude that plugin locally on\nmy system without the need to submit a change for merge.  I can later\nremove those patterns if I like and run git clean -df to clean up.\n-- \nbrian m. carlson / brian with sandals: Houston, Texas, US\nhttps://www.crustytoothpaste.net/~bmc | My opinion only\nOpenPGP: https://keybase.io/bk2204\n"},{"id":"329980","messageId":"86efqe3ub1.fsf@dod.no","threadId":"46924","inReplyTo":"20171006061434.Horde.16MqZ-fejqXm6BLpL7prK1K@crashcourse.ca","subject":"Re: is there a truly compelling rationale for .git/info/exclude?","fromName":"Steinar Bang","fromEmail":"sb@dod.no","sentAt":"2017-10-08T08:41:54Z","receivedAt":"2017-10-08T08:42:12Z","isPatch":false,"sender":{"key":"sb@dod.no","avatar":null},"body":">>>>> rpjday@crashcourse.ca:\n\n>   but even that isn't a really compelling reason. so what's it for?\n\nI use it to ignore stuff in my git-versioned home directory.\n\nEvery time I use a new program and it creates a config file or a config\ndirectory, it shows up as clutter in magit in my git versioned home\ndirectory.\n\nI started with putting the stuff to be ignored in .gitignore, but since\nI run different stuff on different machines and on different OSes,\n.gitignore started to contain irrelevant stuff (ignoring a stuff from a\nprogram that was run once and then never again, ignoring stuff on one\nmachine that maybe should not be ignored on a different machine), and\nthen I figured it was much simpler to just ignore stuff repo-locally in\n.git/info/exclude\n\n\n\n"},{"id":"330315","messageId":"alpine.DEB.2.21.1.1710130116430.40514@virtualbox","threadId":"46924","inReplyTo":"alpine.LFD.2.21.1710061337300.14079@localhost.localdomain","subject":"Re: is there a truly compelling rationale for .git/info/exclude?","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2017-10-12T23:18:00Z","receivedAt":"2017-10-12T23:18:11Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Robert,\n\n[who I had to cull from the To:/Cc: headers, as my mailer consistently\ntold me that there is no valid DNS record to route mail to\nrpjday@crashcourse.ca, which *is* weird.]\n\nOn Fri, 6 Oct 2017, Robert P. J. Day wrote:\n\n> On Fri, 6 Oct 2017, Junio C Hamano wrote:\n> \n> > Don't waste time by seeking a \"compelling\" reason.  A mere \"this is\n> > the most expedite way to gain convenience\" back when something was\n> > introduced could be an answer, and it is way too late to complain\n> > about such a choice anyway.\n> \n>   perfectly respectable answer ... it tells me that, between .gitignore\n>   files and core.excludesFile, there's not much left for\n>   .git/info/exclude to do, except in weird circumstances.\n\nI use .git/info/exclude to keep worktrees in subdirectories of the \"main\"\nworktree.\n\nThat's not really weird. It's just something few people do, but that's not\nthe same as \"weird\".\n\nCiao,\nJohannes\n"},{"id":"330317","messageId":"20171012235623.grpw67yyr64tynev@sigill.intra.peff.net","threadId":"46924","inReplyTo":"alpine.DEB.2.21.1.1710130116430.40514@virtualbox","subject":"Re: is there a truly compelling rationale for .git/info/exclude?","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2017-10-12T23:56:23Z","receivedAt":"2017-10-12T23:56:30Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Fri, Oct 13, 2017 at 01:18:00AM +0200, Johannes Schindelin wrote:\n\n> [who I had to cull from the To:/Cc: headers, as my mailer consistently\n> told me that there is no valid DNS record to route mail to\n> rpjday@crashcourse.ca, which *is* weird.]\n\nYou are not the only one to mention this, so I did 60 seconds of\ndigging. Turns out that the MX of crashcourse.ca points to a CNAME\n(mail.crashcourse.ca), which is explicitly forbidden by RFC 2181\n(section 10.3). Some MTAs are picky about this and others are not (mine\nisn't, so I've added Robert back to the cc so he sees this).\n\n-Peff\n"},{"id":"330337","messageId":"alpine.LFD.2.21.1710130305150.9014@localhost.localdomain","threadId":"46924","inReplyTo":"20171012235623.grpw67yyr64tynev@sigill.intra.peff.net","subject":"Re: is there a truly compelling rationale for .git/info/exclude?","fromName":"Robert P. J. Day","fromEmail":"rpjday@crashcourse.ca","sentAt":"2017-10-13T07:05:33Z","receivedAt":"2017-10-13T07:05:42Z","isPatch":false,"sender":{"key":"rpjday@crashcourse.ca","avatar":"https://avatars.githubusercontent.com/u/226084077?v=4"},"body":"On Thu, 12 Oct 2017, Jeff King wrote:\n\n> On Fri, Oct 13, 2017 at 01:18:00AM +0200, Johannes Schindelin wrote:\n>\n> > [who I had to cull from the To:/Cc: headers, as my mailer consistently\n> > told me that there is no valid DNS record to route mail to\n> > rpjday@crashcourse.ca, which *is* weird.]\n>\n> You are not the only one to mention this, so I did 60 seconds of\n> digging. Turns out that the MX of crashcourse.ca points to a CNAME\n> (mail.crashcourse.ca), which is explicitly forbidden by RFC 2181\n> (section 10.3). Some MTAs are picky about this and others are not\n> (mine isn't, so I've added Robert back to the cc so he sees this).\n\n  ok, i'll tell my admin about this, thanks.\n\nrday\n\n-- \n\n========================================================================\nRobert P. J. Day                                 Ottawa, Ontario, CANADA\n                        http://crashcourse.ca\n\nTwitter:                                       http://twitter.com/rpjday\nLinkedIn:                               http://ca.linkedin.com/in/rpjday\n========================================================================\n"}]}