Template files location
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
Dear diary, on Fri, Aug 05, 2005 at 06:37:11AM CEST, I got a letter where Junio C Hamano <[email protected]> told me that...
Quoted 11 lines
We install files in $(HOME)/etc/git-core/templates/ directory.
In the standard binary distribution scheme, it should probably go to either
/usr/shareor /etc; the former if the distribution prefers static boilerplate files in/usr/share, latter if we consider them site-specific conffiles. I just discussed this privately with a Debian person on the list today, and we are in favor of installing it under/usr/share/git-core/templates, because we do not expect the contents of the standard templates directory will not be a per-site customization [*1*].
Quoted 3 lines
In any case, this means that the make drivers like spec.in and debian/rules would need to override some make variables when they invoke the main
Makefile.
Any reason why that's not the default destination then?
Or you can try /etc/git-core/ and fall back to /usr/share/git-core :-)
Signature · 4 lines
Petr "Pasky" Baudis Stuff: http://pasky.or.cz/ If you want the holes in your knowledge showing up try teaching someone. -- Alan Cox
Quoted 1 line · Petr Baudis
Any reason why that's not the default destination then?
Inertia, installing things under $HOME, is why it is not the default. It may be that the project is mature enough that it is time to move away from default installation in HOME, IOW to change the Makefile to say prefix=/usr/local (or prefix=/usr) to match practices of other projects [*1*].
Quoted 1 line
Or you can try
/etc/git-core/and fall back to/usr/share/git-core:-)
If the template files are to become something that always have to exist, /etc first and then falling back on /usr/share would make a lot of sense. But as Johannes Schindelin correctly argued against the "Use the template mechanism to set up refs/ hierarchy as well." patch [*2*], I think git-init-db should work when there is no template directory. In other words, its primary purpose is to help local project administrators ensure newly created repositories have hooks and probably info/exclude that they recommend to the project members.
The reason to have a sample one shipped as part of the core package is just to help newbies --- they would get a boilerplate hooks/update that explains how they can set it up when they do git-init-db even when they do not have their own customized set of templates yet. For this kind of use, I do not think one default falling back to another is needed.
Come to think of it, GIT_TEMPLATE_DIRECTORY environment variable does not make _ANY_ sense; I am an idiot. It is used only by git-init-db and the reason to have it is to override the default. It should become the command line parameter of it. I'll fix up this breakage soonish.
[Footnote]
*1* This would probably break Linus, myself and others --- everybody has to say "make prefix=$HOME", so I do not think I am actually going to do it any time soon, if ever.
Having prefix=/usr/local as default only helps people who are installing system-wide from the source, and nobody else. People who are writing spec.in and/or debian/rules need to override it to prefix=/usr anyway, and it forces people who are installing to their home to say prefix=$HOME/. I suspect it is an inertia from the good old days when nobody used binary distributions.
*2* And I am sure many others shared the same objection but did not even bother to say anything because what Johannes said made a lot of sense and what the patch did was obviously wrong.
Dear diary, on Fri, Aug 05, 2005 at 07:33:02PM CEST, I got a letter where Junio C Hamano <[email protected]> told me that...
Quoted 3 lines
*2* And I am sure many others shared the same objection but did not even bother to say anything because what Johannes said made a lot of sense and what the patch did was obviously wrong.
Me too, actually. I just didn't step out to see the big picture when writing the grandparent. Now I agree with everything you said.
Signature · 4 lines
Petr "Pasky" Baudis Stuff: http://pasky.or.cz/ If you want the holes in your knowledge showing up try teaching someone. -- Alan Cox
Junio C Hamano wrote:
...
Quoted 9 lines
If the template files are to become something that always have to exist, /etc first and then falling back on
/usr/sharewould make a lot of sense. But as Johannes Schindelin correctly argued against the "Use the template mechanism to set up refs/ hierarchy as well." patch [*2*], I think git-init-db should work when there is no template directory. In other words, its primary purpose is to help local project administrators ensure newly created repositories have hooks and probably info/exclude that they recommend to the project members.
So templates are project specific.
Quoted 6 lines
The reason to have a sample one shipped as part of the core package is just to help newbies --- they would get a boilerplate hooks/update that explains how they can set it up when they do git-init-db even when they do not have their own customized set of templates yet. For this kind of use, I do not think one default falling back to another is needed.
Shipping samples with the plumbing makes sense, especially when the documentation in is insufficient. But installing the samples as part of the default install process seems less than desirable. Or, alternately, install the samples in with the documentation as (non-executable) examples.
...
Quoted 10 lines
*1* This would probably break Linus, myself and others --- everybody has to say "make prefix=$HOME", so I do not think I am actually going to do it any time soon, if ever.
Having prefix=/usr/local as default only helps people who are installing system-wide from the source, and nobody else. People who are writing spec.in and/or debian/rules need to override it to prefix=/usr anyway, and it forces people who are installing to their home to say prefix=$HOME/. I suspect it is an inertia from the good old days when nobody used binary distributions.
Rather than changing the default install location in such a way as to make half the user unhappy, make everybody (un)happy by removing the default and forcing it to be specified when make is executed.
Quoted 3 lines · A Large Angry SCM
Rather than changing the default install location in such a way as to make half the user unhappy, make everybody (un)happy by removing the default and forcing it to be specified when make is executed.
Lots of stuff installs to /usr/local if not stated otherwise. I don't see why git should be different.
Why make *everybody* unhappy if we can avoid it?
Signature · 5 lines
Matthias Urlichs | {M:U} IT Design @ m-u-it.de | [email protected]
Disclaimer: The quote was selected randomly. Really. | http://smurf.noris.de
- -
Grain grows best in shit
-- U. K. LeGuin