git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <junkio@cox.net>
To: Petr Baudis <pasky@ucw.cz>
Cc: Chris Wright <chrisw@osdl.org>,
	Linus Torvalds <torvalds@osdl.org>,
	git@vger.kernel.org
Subject: Re: Template files location
Date: Fri, 05 Aug 2005 10:33:02 -0700	[thread overview]
Message-ID: <7vpsssjnld.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: <20050805094324.GF29216@pasky.ji.cz> (Petr Baudis's message of "Fri, 5 Aug 2005 11:43:24 +0200")

Petr Baudis <pasky@ucw.cz> writes:

> 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*].

> 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.

  reply	other threads:[~2005-08-05 17:33 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <42DC4537.2080103@orionmulti.com>
     [not found] ` <20050805024222.GE7762@shell0.pdx.osdl.net>
     [not found]   ` <42F2E571.6040207@orionmulti.com>
     [not found]     ` <7voe8dow4w.fsf@assigned-by-dhcp.cox.net>
     [not found]       ` <20050805042332.GG7762@shell0.pdx.osdl.net>
     [not found]         ` <7vd5otov7s.fsf@assigned-by-dhcp.cox.net>
2005-08-05  9:43           ` Template files location Petr Baudis
2005-08-05 17:33             ` Junio C Hamano [this message]
2005-08-05 17:50               ` A Large Angry SCM
2005-08-10 22:03                 ` Matthias Urlichs
2005-08-09 20:42               ` Petr Baudis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7vpsssjnld.fsf@assigned-by-dhcp.cox.net \
    --to=junkio@cox.net \
    --cc=chrisw@osdl.org \
    --cc=git@vger.kernel.org \
    --cc=pasky@ucw.cz \
    --cc=torvalds@osdl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).