<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/templates/hooks--commit-msg.sample, branch main</title>
<subtitle>Fork of git SCM with my patches.</subtitle>
<id>http://git.kilabit.info/git/atom?h=main</id>
<link rel='self' href='http://git.kilabit.info/git/atom?h=main'/>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/'/>
<updated>2024-12-06T22:52:12Z</updated>
<entry>
<title>Makefile: simplify building of templates</title>
<updated>2024-12-06T22:52:12Z</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2024-12-06T13:24:52Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=ed060aa0a35f5d0e201af45c6a32c405db4c2654'/>
<id>urn:sha1:ed060aa0a35f5d0e201af45c6a32c405db4c2654</id>
<content type='text'>
When we install Git we also install a set of default templates that both
git-init(1) and git-clone(1) populate into our build directories. The
way the pristine templates are laid out in our source directory is
somewhat weird though: instead of reconstructing the actual directory
hierarchy in "templates/", we represent directory separators with "--".

The only reason I could come up with for why we have this is the
"branches/" directory, which is supposed to be empty when installing it.
And as Git famously doesn't store empty directories at all we have to
work around this limitation.

Now the thing is that the "branches/" directory is a leftover to how
branches used to be stored in the dark ages. gitrepository-layout(5)
lists this directory as "slightly deprecated", which I would claim is a
strong understatement. I have never encountered anybody using it today
and would be surprised if it even works as expected. So having the "--"
hack in place for an item that is basically unused, unmaintained and
deprecated doesn't only feel unreasonable, but installing that entry by
default may also cause confusion for users that do not know what this is
supposed to be in the first place.

Remove this directory from our templates and, now that we do not require
the workaround anymore, restructure the templates to form a proper
hierarchy. This makes it way easier for build systems to install these
templates into place.

We should likely think about removing support for "branch/" altogether,
but that is outside of the scope of this patch series.

Signed-off-by: Patrick Steinhardt &lt;ps@pks.im&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Modernize git calling conventions in hook templates</title>
<updated>2010-03-20T16:04:38Z</updated>
<author>
<name>Ben Walton</name>
<email>bwalton@artsci.utoronto.ca</email>
</author>
<published>2010-03-20T14:48:09Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=100e762a60a691a4978434f1cd5532e19cad39fc'/>
<id>urn:sha1:100e762a60a691a4978434f1cd5532e19cad39fc</id>
<content type='text'>
The hook templates were still using/referencing 'git-foo' instead of
'git foo.'  This patch updates the sample hooks to use the modern
conventions instead.

Signed-off-by: Ben Walton &lt;bwalton@artsci.utoronto.ca&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Ship sample hooks with .sample suffix</title>
<updated>2008-06-25T02:06:22Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2008-06-25T01:45:21Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=f98f8cbac01e0d5dbb30660d7ea70af6a1439dfd'/>
<id>urn:sha1:f98f8cbac01e0d5dbb30660d7ea70af6a1439dfd</id>
<content type='text'>
We used to mark hooks we ship as samples by making them unexecutable, but
some filesystems cannot tell what is executable and what is not.

This makes it much more explicit.  The hooks are suffixed with .sample
(but now are made executable), so enabling it is still one step operation
(instead of "chmod +x $hook", you would do "mv $hook.sample $hook") but
now they won't get accidentally enabled on systems without executable bit.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
