{"thread":{"id":"28498","subject":"[PATCH 2/2] templates/hooks--*: don't refer to contrib hooks","startedAt":"2011-09-26T12:59:32Z","lastAt":"2011-09-27T11:56:53Z","messageCount":3,"participants":["Gerrit Pape","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":2},"messages":[{"id":"176203","messageId":"20110926125932.27854.qmail@804c778e7e6607.315fe32.mid.smarden.org","threadId":"28498","inReplyTo":null,"subject":"[PATCH 2/2] templates/hooks--*: don't refer to contrib hooks","fromName":"Gerrit Pape","fromEmail":"pape@smarden.org","sentAt":"2011-09-26T12:59:32Z","receivedAt":"2011-09-26T12:59:32Z","isPatch":true,"sender":{"key":"pape@smarden.org","avatar":"https://avatars.githubusercontent.com/u/143170252?v=4"},"body":"Simplify the sample post-receive hook to not refer to some location of a\ncontrib hook that might be installed in different locations on different\nsystems.  Instead simply provide a sample file that does nothing just as\nthe post-commit sample hook.\n\nSigned-off-by: Gerrit Pape <pape@smarden.org>\n---\n templates/hooks--post-receive.sample |   12 ++----------\n 1 files changed, 2 insertions(+), 10 deletions(-)\n\ndiff --git a/templates/hooks--post-receive.sample b/templates/hooks--post-receive.sample\nindex 7a83e17..5b1771f 100755\n--- a/templates/hooks--post-receive.sample\n+++ b/templates/hooks--post-receive.sample\n@@ -2,14 +2,6 @@\n #\n # An example hook script for the \"post-receive\" event.\n #\n-# The \"post-receive\" script is run after receive-pack has accepted a pack\n-# and the repository has been updated.  It is passed arguments in through\n-# stdin in the form\n-#  <oldrev> <newrev> <refname>\n-# For example:\n-#  aa453216d1b3e49e7f6f98441fa56946ddcd6a20 68f7abf4e6f922807889f52bc043ecd31b79f814 refs/heads/master\n-#\n-# see contrib/hooks/ for a sample, or uncomment the next line and\n-# rename the file to \"post-receive\".\n+# To enable this hook, rename this file to \"post-receive\".\n \n-#. /usr/share/doc/git-core/contrib/hooks/post-receive-email\n+: Nothing\n-- \n1.7.6.3\n"},{"id":"176237","messageId":"7vbou742eg.fsf@alter.siamese.dyndns.org","threadId":"28498","inReplyTo":"20110926125932.27854.qmail@804c778e7e6607.315fe32.mid.smarden.org","subject":"Re: [PATCH 2/2] templates/hooks--*: don't refer to contrib hooks","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2011-09-26T17:52:23Z","receivedAt":"2011-09-26T17:52:23Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Gerrit Pape <pape@smarden.org> writes:\n\n> Simplify the sample post-receive hook to not refer to some location of a\n> contrib hook that might be installed in different locations on different\n> systems.  Instead simply provide a sample file that does nothing just as\n> the post-commit sample hook.\n>\n> Signed-off-by: Gerrit Pape <pape@smarden.org>\n> ---\n>  templates/hooks--post-receive.sample |   12 ++----------\n>  1 files changed, 2 insertions(+), 10 deletions(-)\n>\n> diff --git a/templates/hooks--post-receive.sample b/templates/hooks--post-receive.sample\n> index 7a83e17..5b1771f 100755\n> --- a/templates/hooks--post-receive.sample\n> +++ b/templates/hooks--post-receive.sample\n> @@ -2,14 +2,6 @@\n>  #\n>  # An example hook script for the \"post-receive\" event.\n>  #\n> +# To enable this hook, rename this file to \"post-receive\".\n>  \n> +: Nothing\n\nI removed the \"-\" lines above. Looking at the result, I really have to\nwonder if it makes much sense to keep the file here. It is not even an\nexample anymore, and the user does not gain anything by enabling it,\nfollowing the suggestion.\n\nLet's instead remove the file altogether, Ok?\n"},{"id":"176328","messageId":"20110927115653.24283.qmail@bdefd4038bc987.315fe32.mid.smarden.org","threadId":"28498","inReplyTo":"7vbou742eg.fsf@alter.siamese.dyndns.org","subject":"[PATCH] templates/hooks--*: remove sample hooks without any functionality","fromName":"Gerrit Pape","fromEmail":"pape@smarden.org","sentAt":"2011-09-27T11:56:53Z","receivedAt":"2011-09-27T11:56:53Z","isPatch":true,"sender":{"key":"pape@smarden.org","avatar":"https://avatars.githubusercontent.com/u/143170252?v=4"},"body":"Remove the sample post-commit and post-receive hooks.  The sample\npost-commit doesn't contain any sample functionality and the comments do\nnot provide more information than already found in the documentation.\nThe sample post-receive hooks doesn't provide any sample functionality\neither and refers in the comments to a contrib hook that might be\ninstalled in different locations on different systems, which isn't that\nhelpful.\n\nSigned-off-by: Gerrit Pape <pape@smarden.org>\n---\n\nOn Mon, Sep 26, 2011 at 10:52:23AM -0700, Junio C Hamano wrote:\n> I removed the \"-\" lines above. Looking at the result, I really have to\n> wonder if it makes much sense to keep the file here. It is not even an\n> example anymore, and the user does not gain anything by enabling it,\n> following the suggestion.\n>\n> Let's instead remove the file altogether, Ok?\n\nFine with me.  As the same applies to the sample post-commit hook, I\nmade this patch to remove both of them.\n\nThanks for your patience, Gerrit.\n\n\n templates/hooks--post-commit.sample  |    8 --------\n templates/hooks--post-receive.sample |   15 ---------------\n 2 files changed, 0 insertions(+), 23 deletions(-)\n delete mode 100755 templates/hooks--post-commit.sample\n delete mode 100755 templates/hooks--post-receive.sample\n\ndiff --git a/templates/hooks--post-commit.sample b/templates/hooks--post-commit.sample\ndeleted file mode 100755\nindex 2266821..0000000\n--- a/templates/hooks--post-commit.sample\n+++ /dev/null\n@@ -1,8 +0,0 @@\n-#!/bin/sh\n-#\n-# An example hook script that is called after a successful\n-# commit is made.\n-#\n-# To enable this hook, rename this file to \"post-commit\".\n-\n-: Nothing\ndiff --git a/templates/hooks--post-receive.sample b/templates/hooks--post-receive.sample\ndeleted file mode 100755\nindex 7a83e17..0000000\n--- a/templates/hooks--post-receive.sample\n+++ /dev/null\n@@ -1,15 +0,0 @@\n-#!/bin/sh\n-#\n-# An example hook script for the \"post-receive\" event.\n-#\n-# The \"post-receive\" script is run after receive-pack has accepted a pack\n-# and the repository has been updated.  It is passed arguments in through\n-# stdin in the form\n-#  <oldrev> <newrev> <refname>\n-# For example:\n-#  aa453216d1b3e49e7f6f98441fa56946ddcd6a20 68f7abf4e6f922807889f52bc043ecd31b79f814 refs/heads/master\n-#\n-# see contrib/hooks/ for a sample, or uncomment the next line and\n-# rename the file to \"post-receive\".\n-\n-#. /usr/share/doc/git-core/contrib/hooks/post-receive-email\n-- \n1.7.6.3\n"}]}