{"thread":{"id":"26390","subject":"[PATCH] post-receive-email: suppress error if description file missing","startedAt":"2011-02-02T17:42:42Z","lastAt":"2011-02-03T01:00:32Z","messageCount":3,"participants":["Sitaram Chamarty","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"160279","messageId":"20110202174242.GA12470@atcmail.atc.tcs.com","threadId":"26390","inReplyTo":null,"subject":"[PATCH] post-receive-email: suppress error if description file missing","fromName":"Sitaram Chamarty","fromEmail":"sitaramc@gmail.com","sentAt":"2011-02-02T17:42:42Z","receivedAt":"2011-02-02T17:42:42Z","isPatch":true,"sender":{"key":"sitaramc@gmail.com","avatar":"https://avatars.githubusercontent.com/u/43316?v=4"},"body":"---\n contrib/hooks/post-receive-email |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/contrib/hooks/post-receive-email b/contrib/hooks/post-receive-email\nindex f99ea95..71f2b47 100755\n--- a/contrib/hooks/post-receive-email\n+++ b/contrib/hooks/post-receive-email\n@@ -709,7 +709,7 @@ if [ -z \"$GIT_DIR\" ]; then\n \texit 1\n fi\n \n-projectdesc=$(sed -ne '1p' \"$GIT_DIR/description\")\n+projectdesc=$(sed -ne '1p' \"$GIT_DIR/description 2>/dev/null\")\n # Check if the description is unchanged from it's default, and shorten it to\n # a more manageable length if it is\n if expr \"$projectdesc\" : \"Unnamed repository.*$\" >/dev/null\n-- \n1.7.3.4\n"},{"id":"160282","messageId":"7vbp2uxozo.fsf@alter.siamese.dyndns.org","threadId":"26390","inReplyTo":"20110202174242.GA12470@atcmail.atc.tcs.com","subject":"Re: [PATCH] post-receive-email: suppress error if description file missing","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2011-02-02T18:36:43Z","receivedAt":"2011-02-02T18:36:43Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Sitaram Chamarty <sitaramc@gmail.com> writes:\n\n> ---\n>  contrib/hooks/post-receive-email |    2 +-\n>  1 files changed, 1 insertions(+), 1 deletions(-)\n>\n> diff --git a/contrib/hooks/post-receive-email b/contrib/hooks/post-receive-email\n> index f99ea95..71f2b47 100755\n> --- a/contrib/hooks/post-receive-email\n> +++ b/contrib/hooks/post-receive-email\n> @@ -709,7 +709,7 @@ if [ -z \"$GIT_DIR\" ]; then\n>  \texit 1\n>  fi\n>  \n> -projectdesc=$(sed -ne '1p' \"$GIT_DIR/description\")\n> +projectdesc=$(sed -ne '1p' \"$GIT_DIR/description 2>/dev/null\")\n\nI suspect that you would want to have the redirection outside the dq pair,\nbut other than that, well spotted.\n\nYou forgot to sign-off, though ;-)\n\n>  # Check if the description is unchanged from it's default, and shorten it to\n>  # a more manageable length if it is\n>  if expr \"$projectdesc\" : \"Unnamed repository.*$\" >/dev/null\n> -- \n> 1.7.3.4\n"},{"id":"160300","messageId":"20110203010032.GA30329@atcmail.atc.tcs.com","threadId":"26390","inReplyTo":"7vbp2uxozo.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH] post-receive-email: suppress error if description file missing","fromName":"Sitaram Chamarty","fromEmail":"sitaramc@gmail.com","sentAt":"2011-02-03T01:00:32Z","receivedAt":"2011-02-03T01:00:32Z","isPatch":true,"sender":{"key":"sitaramc@gmail.com","avatar":"https://avatars.githubusercontent.com/u/43316?v=4"},"body":"Signed-off-by: Sitaram Chamarty <sitaramc@gmail.com>\n---\n\nOn Wed, Feb 02, 2011 at 10:36:43AM -0800, Junio C Hamano wrote:\n\n> I suspect that you would want to have the redirection outside the dq pair,\n> but other than that, well spotted.\n\ndoh!  Thanks for catching the stupid error -- I shouldn't attempt even a\nsimple patch when half-asleep I guess :)\n\n> You forgot to sign-off, though ;-)\n\ndone!\n\n contrib/hooks/post-receive-email |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/contrib/hooks/post-receive-email b/contrib/hooks/post-receive-email\nindex f99ea95..21989fc 100755\n--- a/contrib/hooks/post-receive-email\n+++ b/contrib/hooks/post-receive-email\n@@ -709,7 +709,7 @@ if [ -z \"$GIT_DIR\" ]; then\n \texit 1\n fi\n \n-projectdesc=$(sed -ne '1p' \"$GIT_DIR/description\")\n+projectdesc=$(sed -ne '1p' \"$GIT_DIR/description\" 2>/dev/null)\n # Check if the description is unchanged from it's default, and shorten it to\n # a more manageable length if it is\n if expr \"$projectdesc\" : \"Unnamed repository.*$\" >/dev/null\n-- \n1.7.3.4\n"}]}