{"thread":{"id":"16760","subject":"[PATCH] Documentation: fix description for enabling hooks","startedAt":"2008-12-17T02:59:23Z","lastAt":"2008-12-17T21:29:06Z","messageCount":6,"participants":["Markus Heidelberg","Miklos Vajna","Johannes Sixt"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"98094","messageId":"200812170359.24109.markus.heidelberg@web.de","threadId":"16760","inReplyTo":null,"subject":"[PATCH] Documentation: fix description for enabling hooks","fromName":"Markus Heidelberg","fromEmail":"markus.heidelberg@web.de","sentAt":"2008-12-17T02:59:23Z","receivedAt":"2008-12-17T02:59:23Z","isPatch":true,"sender":{"key":"markus.heidelberg@web.de","avatar":"https://avatars.githubusercontent.com/u/6334512?v=4"},"body":"Since f98f8cb (Ship sample hooks with .sample suffix, 2008-06-24) hooks\nare not enabled by making them executable anymore, but by removing the\n'.sample' suffix from the filename.\n\nSigned-off-by: Markus Heidelberg <markus.heidelberg@web.de>\n---\n Documentation/gitrepository-layout.txt |    3 ++-\n Documentation/glossary-content.txt     |    3 ++-\n 2 files changed, 4 insertions(+), 2 deletions(-)\n\ndiff --git a/Documentation/gitrepository-layout.txt b/Documentation/gitrepository-layout.txt\nindex a969b3f..1befca9 100644\n--- a/Documentation/gitrepository-layout.txt\n+++ b/Documentation/gitrepository-layout.txt\n@@ -134,7 +134,8 @@ hooks::\n \tHooks are customization scripts used by various git\n \tcommands.  A handful of sample hooks are installed when\n \t'git-init' is run, but all of them are disabled by\n-\tdefault.  To enable, they need to be made executable.\n+\tdefault.  To enable, the `.sample` suffix has to be\n+\tremoved from the filename by renaming.\n \tRead linkgit:githooks[5] for more details about\n \teach hook.\n \ndiff --git a/Documentation/glossary-content.txt b/Documentation/glossary-content.txt\nindex 9b4a4f4..9afca75 100644\n--- a/Documentation/glossary-content.txt\n+++ b/Documentation/glossary-content.txt\n@@ -183,7 +183,8 @@ to point at the new commit.\n \tand potentially aborted, and allow for a post-notification after the\n \toperation is done. The hook scripts are found in the\n \t`$GIT_DIR/hooks/` directory, and are enabled by simply\n-\tmaking them executable.\n+\tremoving the `.sample` suffix from the filename. In earlier versions\n+\tof git you had to make them executable.\n \n [[def_index]]index::\n \tA collection of files with stat information, whose contents are stored\n-- \n1.6.1.rc3.23.gaf48b\n"},{"id":"98097","messageId":"20081217041312.GZ5691@genesis.frugalware.org","threadId":"16760","inReplyTo":"200812170359.24109.markus.heidelberg@web.de","subject":"Re: [PATCH] Documentation: fix description for enabling hooks","fromName":"Miklos Vajna","fromEmail":"vmiklos@frugalware.org","sentAt":"2008-12-17T04:13:12Z","receivedAt":"2008-12-17T04:13:12Z","isPatch":true,"sender":{"key":"vmiklos@frugalware.org","avatar":"https://gravatar.com/avatar/401c1cbbb3a5d13e650c691a2c71d6fd0b80df1a01bc74d9f1972675dd58f2bd?d=mp&s=160"},"body":"On Wed, Dec 17, 2008 at 03:59:23AM +0100, Markus Heidelberg <markus.heidelberg@web.de> wrote:\n> Since f98f8cb (Ship sample hooks with .sample suffix, 2008-06-24) hooks\n> are not enabled by making them executable anymore, but by removing the\n> '.sample' suffix from the filename.\n\nThis is true, but having the executable bit is necessary as well. I\nthink it would be better to just append this requirement instead of\nreplacing the old one with this.\n"},{"id":"98103","messageId":"4948ADE8.2050804@viscovery.net","threadId":"16760","inReplyTo":"20081217041312.GZ5691@genesis.frugalware.org","subject":"Re: [PATCH] Documentation: fix description for enabling hooks","fromName":"Johannes Sixt","fromEmail":"j.sixt@viscovery.net","sentAt":"2008-12-17T07:44:40Z","receivedAt":"2008-12-17T07:44:40Z","isPatch":true,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"Miklos Vajna schrieb:\n> On Wed, Dec 17, 2008 at 03:59:23AM +0100, Markus Heidelberg <markus.heidelberg@web.de> wrote:\n>> Since f98f8cb (Ship sample hooks with .sample suffix, 2008-06-24) hooks\n>> are not enabled by making them executable anymore, but by removing the\n>> '.sample' suffix from the filename.\n> \n> This is true, but having the executable bit is necessary as well. I\n> think it would be better to just append this requirement instead of\n> replacing the old one with this.\n\nMarkus's proposed new wording is correct because the .sample hooks *are*\nalready executable.\n\n-- Hannes\n"},{"id":"98145","messageId":"20081217143627.GB5691@genesis.frugalware.org","threadId":"16760","inReplyTo":"4948ADE8.2050804@viscovery.net","subject":"Re: [PATCH] Documentation: fix description for enabling hooks","fromName":"Miklos Vajna","fromEmail":"vmiklos@frugalware.org","sentAt":"2008-12-17T14:36:27Z","receivedAt":"2008-12-17T14:36:27Z","isPatch":true,"sender":{"key":"vmiklos@frugalware.org","avatar":"https://gravatar.com/avatar/401c1cbbb3a5d13e650c691a2c71d6fd0b80df1a01bc74d9f1972675dd58f2bd?d=mp&s=160"},"body":"On Wed, Dec 17, 2008 at 08:44:40AM +0100, Johannes Sixt <j.sixt@viscovery.net> wrote:\n> > This is true, but having the executable bit is necessary as well. I\n> > think it would be better to just append this requirement instead of\n> > replacing the old one with this.\n> \n> Markus's proposed new wording is correct because the .sample hooks *are*\n> already executable.\n\nI thought about the following situation: The user reads the\ndocumentation while working in an older repo (initialized a few versions\nago). S/he sees that the .sample suffix is already missing, so s/he\nassumes that the hook is already active. Which is not true, because the\n+x bit is missing.\n"},{"id":"98168","messageId":"200812172055.45905.markus.heidelberg@web.de","threadId":"16760","inReplyTo":"20081217143627.GB5691@genesis.frugalware.org","subject":"Re: [PATCH] Documentation: fix description for enabling hooks","fromName":"Markus Heidelberg","fromEmail":"markus.heidelberg@web.de","sentAt":"2008-12-17T19:55:45Z","receivedAt":"2008-12-17T19:55:45Z","isPatch":true,"sender":{"key":"markus.heidelberg@web.de","avatar":"https://avatars.githubusercontent.com/u/6334512?v=4"},"body":"Miklos Vajna, 17.12.2008:\n> On Wed, Dec 17, 2008 at 08:44:40AM +0100, Johannes Sixt <j.sixt@viscovery.net> wrote:\n> > > This is true, but having the executable bit is necessary as well. I\n> > > think it would be better to just append this requirement instead of\n> > > replacing the old one with this.\n> > \n> > Markus's proposed new wording is correct because the .sample hooks *are*\n> > already executable.\n> \n> I thought about the following situation: The user reads the\n> documentation while working in an older repo (initialized a few versions\n> ago). S/he sees that the .sample suffix is already missing, so s/he\n> assumes that the hook is already active. Which is not true, because the\n> +x bit is missing.\n\nValid point, I think, but not critical in this case, since the patch\nonly affected gitrepository-layout(5) and gitglossary(7).\n\nWhen you want to learn how to use hooks, you will probably rather read\ngithooks(5), where the need for the executable bit is not even\nexplicitly mentioned. Maybe it should be added there?\n\nMarkus\n"},{"id":"98186","messageId":"1229549346-17863-1-git-send-email-vmiklos@frugalware.org","threadId":"16760","inReplyTo":"200812172055.45905.markus.heidelberg@web.de","subject":"[PATCH] githooks documentation: add a note about the +x mode","fromName":"Miklos Vajna","fromEmail":"vmiklos@frugalware.org","sentAt":"2008-12-17T21:29:06Z","receivedAt":"2008-12-17T21:29:06Z","isPatch":true,"sender":{"key":"vmiklos@frugalware.org","avatar":"https://gravatar.com/avatar/401c1cbbb3a5d13e650c691a2c71d6fd0b80df1a01bc74d9f1972675dd58f2bd?d=mp&s=160"},"body":"In a freshly initialized repo it is only necessary to rename the .sample\nhooks, but when using older repos (initialized with older git init)\nenabled the +x mode is still necessary - docuement this.\n\nSigned-off-by: Miklos Vajna <vmiklos@frugalware.org>\n---\n\nOn Wed, Dec 17, 2008 at 08:55:45PM +0100, Markus Heidelberg <markus.heidelberg@web.de> wrote:\n> When you want to learn how to use hooks, you will probably rather read\n> githooks(5), where the need for the executable bit is not even\n> explicitly mentioned. Maybe it should be added there?\n\nI think so.\n\n Documentation/githooks.txt |    4 ++++\n 1 files changed, 4 insertions(+), 0 deletions(-)\n\ndiff --git a/Documentation/githooks.txt b/Documentation/githooks.txt\nindex 5faaaa5..cfdae1e 100644\n--- a/Documentation/githooks.txt\n+++ b/Documentation/githooks.txt\n@@ -20,6 +20,10 @@ directory to trigger action at certain points.  When\n all disabled.  To enable a hook, rename it by removing its `.sample`\n suffix.\n \n+NOTE: It is also a requirement for a given hook to be executable.\n+However - in a freshly initialized repository - the `.sample` files are\n+executable by default.\n+\n This document describes the currently defined hooks.\n \n applypatch-msg\n-- \n1.6.1.rc1.35.gae26e.dirty\n"}]}