{"thread":{"id":"1428","subject":"Template files location","startedAt":"2005-08-05T09:43:24Z","lastAt":"2005-08-10T22:03:40Z","messageCount":5,"participants":["Petr Baudis","Junio C Hamano","A Large Angry SCM","Matthias Urlichs"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"6847","messageId":"20050805094324.GF29216@pasky.ji.cz","threadId":"1428","inReplyTo":"7vd5otov7s.fsf@assigned-by-dhcp.cox.net","subject":"Template files location","fromName":"Petr Baudis","fromEmail":"pasky@ucw.cz","sentAt":"2005-08-05T09:43:24Z","receivedAt":"2005-08-05T09:43:24Z","isPatch":false,"sender":{"key":"pasky@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/18439?v=4"},"body":"Dear diary, on Fri, Aug 05, 2005 at 06:37:11AM CEST, I got a letter\nwhere Junio C Hamano <junkio@cox.net> told me that...\n> We install files in $(HOME)/etc/git-core/templates/ directory.\n> \n> In the standard binary distribution scheme, it should probably\n> go to either /usr/share or /etc; the former if the distribution\n> prefers static boilerplate files in /usr/share, latter if we\n> consider them site-specific conffiles.  I just discussed this\n> privately with a Debian person on the list today, and we are in\n> favor of installing it under /usr/share/git-core/templates,\n> because we do not expect the contents of the standard templates\n> directory will not be a per-site customization [*1*].\n> \n> In any case, this means that the make drivers like spec.in and\n> debian/rules would need to override some make variables when\n> they invoke the main Makefile.\n\nAny reason why that's not the default destination then?\n\nOr you can try /etc/git-core/ and fall back to /usr/share/git-core :-)\n\n-- \n\t\t\t\tPetr \"Pasky\" Baudis\nStuff: http://pasky.or.cz/\nIf you want the holes in your knowledge showing up try teaching\nsomeone.  -- Alan Cox\n"},{"id":"6857","messageId":"7vpsssjnld.fsf@assigned-by-dhcp.cox.net","threadId":"1428","inReplyTo":"20050805094324.GF29216@pasky.ji.cz","subject":"Re: Template files location","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2005-08-05T17:33:02Z","receivedAt":"2005-08-05T17:33:02Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Petr Baudis <pasky@ucw.cz> writes:\n\n> Any reason why that's not the default destination then?\n\nInertia, installing things under $HOME, is why it is not the\ndefault.  It may be that the project is mature enough that it is\ntime to move away from default installation in HOME, IOW to\nchange the Makefile to say prefix=/usr/local (or prefix=/usr)\nto match practices of other projects [*1*].\n\n> Or you can try /etc/git-core/ and fall back to /usr/share/git-core :-)\n\nIf the template files are to become something that always have\nto exist, /etc first and then falling back on /usr/share would\nmake a lot of sense.  But as Johannes Schindelin correctly\nargued against the \"Use the template mechanism to set up refs/\nhierarchy as well.\" patch [*2*], I think git-init-db should work\nwhen there is no template directory.  In other words, its\nprimary purpose is to help local project administrators ensure\nnewly created repositories have hooks and probably info/exclude\nthat they recommend to the project members.\n\nThe reason to have a sample one shipped as part of the core\npackage is just to help newbies --- they would get a boilerplate\nhooks/update that explains how they can set it up when they do\ngit-init-db even when they do not have their own customized set\nof templates yet.  For this kind of use, I do not think one\ndefault falling back to another is needed.\n\nCome to think of it, GIT_TEMPLATE_DIRECTORY environment variable\ndoes not make _ANY_ sense; I am an idiot.  It is used only by\ngit-init-db and the reason to have it is to override the\ndefault.  It should become the command line parameter of it.\nI'll fix up this breakage soonish.\n\n\n[Footnote]\n\n*1* This would probably break Linus, myself and others ---\neverybody has to say \"make prefix=$HOME\", so I do not think I am\nactually going to do it any time soon, if ever.\n\nHaving prefix=/usr/local as default only helps people who are\ninstalling system-wide from the source, and nobody else.  People\nwho are writing spec.in and/or debian/rules need to override it\nto prefix=/usr anyway, and it forces people who are installing\nto their home to say prefix=$HOME/.  I suspect it is an inertia\nfrom the good old days when nobody used binary distributions.\n\n*2* And I am sure many others shared the same objection but did\nnot even bother to say anything because what Johannes said made\na lot of sense and what the patch did was obviously wrong.\n"},{"id":"6858","messageId":"42F3A6E5.2070502@gmail.com","threadId":"1428","inReplyTo":"7vpsssjnld.fsf@assigned-by-dhcp.cox.net","subject":"Re: Template files location","fromName":"A Large Angry SCM","fromEmail":"gitzilla@gmail.com","sentAt":"2005-08-05T17:50:29Z","receivedAt":"2005-08-05T17:50:29Z","isPatch":false,"sender":{"key":"gitzilla@gmail.com","avatar":"https://gravatar.com/avatar/354625c442439908ff3dd99757dee330e29e9df7847472384faf7a00add247fb?d=mp&s=160"},"body":"Junio C Hamano wrote:\n...\n> If the template files are to become something that always have\n> to exist, /etc first and then falling back on /usr/share would\n> make a lot of sense.  But as Johannes Schindelin correctly\n> argued against the \"Use the template mechanism to set up refs/\n> hierarchy as well.\" patch [*2*], I think git-init-db should work\n> when there is no template directory.  In other words, its\n> primary purpose is to help local project administrators ensure\n> newly created repositories have hooks and probably info/exclude\n> that they recommend to the project members.\n\nSo templates are project specific.\n\n> The reason to have a sample one shipped as part of the core\n> package is just to help newbies --- they would get a boilerplate\n> hooks/update that explains how they can set it up when they do\n> git-init-db even when they do not have their own customized set\n> of templates yet.  For this kind of use, I do not think one\n> default falling back to another is needed.\n\nShipping samples with the plumbing makes sense, especially when the \ndocumentation in is insufficient. But installing the samples as part of \nthe default install process seems less than desirable. Or, alternately, \ninstall the samples in with the documentation as (non-executable) examples.\n\n...\n> *1* This would probably break Linus, myself and others ---\n> everybody has to say \"make prefix=$HOME\", so I do not think I am\n> actually going to do it any time soon, if ever.\n> \n> Having prefix=/usr/local as default only helps people who are\n> installing system-wide from the source, and nobody else.  People\n> who are writing spec.in and/or debian/rules need to override it\n> to prefix=/usr anyway, and it forces people who are installing\n> to their home to say prefix=$HOME/.  I suspect it is an inertia\n> from the good old days when nobody used binary distributions.\n\nRather than changing the default install location in such a way as to \nmake half the user unhappy, make everybody (un)happy by removing the \ndefault and forcing it to be specified when make is executed.\n"},{"id":"7003","messageId":"20050809204254.GD7052@pasky.ji.cz","threadId":"1428","inReplyTo":"7vpsssjnld.fsf@assigned-by-dhcp.cox.net","subject":"Re: Template files location","fromName":"Petr Baudis","fromEmail":"pasky@suse.cz","sentAt":"2005-08-09T20:42:54Z","receivedAt":"2005-08-09T20:42:54Z","isPatch":false,"sender":{"key":"pasky@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/18439?v=4"},"body":"Dear diary, on Fri, Aug 05, 2005 at 07:33:02PM CEST, I got a letter\nwhere Junio C Hamano <junkio@cox.net> told me that...\n> *2* And I am sure many others shared the same objection but did\n> not even bother to say anything because what Johannes said made\n> a lot of sense and what the patch did was obviously wrong.\n\nMe too, actually. I just didn't step out to see the big picture when\nwriting the grandparent. Now I agree with everything you said.\n\n-- \n\t\t\t\tPetr \"Pasky\" Baudis\nStuff: http://pasky.or.cz/\nIf you want the holes in your knowledge showing up try teaching\nsomeone.  -- Alan Cox\n"},{"id":"7040","messageId":"pan.2005.08.10.22.03.39.544630@smurf.noris.de","threadId":"1428","inReplyTo":"42F3A6E5.2070502@gmail.com","subject":"Re: Template files location","fromName":"Matthias Urlichs","fromEmail":"smurf@smurf.noris.de","sentAt":"2005-08-10T22:03:40Z","receivedAt":"2005-08-10T22:03:40Z","isPatch":false,"sender":{"key":"matthias@urlichs.de","avatar":"https://gravatar.com/avatar/2708905af227313eba6f2b2ae0f7d0259b5ac5d71baef58fe5a13c699ce0bbf0?d=mp&s=160"},"body":"Hi, A Large Angry SCM wrote:\n\n> Rather than changing the default install location in such a way as to make\n> half the user unhappy, make everybody (un)happy by removing the default\n> and forcing it to be specified when make is executed.\n\nLots of stuff installs to /usr/local if not stated otherwise.\nI don't see why git should be different.\n\nWhy make *everybody* unhappy if we can avoid it?\n\n-- \nMatthias Urlichs   |   {M:U} IT Design @ m-u-it.de   |  smurf@smurf.noris.de\nDisclaimer: The quote was selected randomly. Really. | http://smurf.noris.de\n - -\nGrain grows best in shit\n\t\t-- U. K. LeGuin\n"}]}