{"thread":{"id":"7861","subject":"[PATCH 3/2] post-receive-email example hook: sed command for getting description was wrong","startedAt":"2007-04-26T21:37:16Z","lastAt":"2007-04-26T21:37:16Z","messageCount":1,"participants":["Andy Parkins"],"isPatch":true,"patchVersion":1,"patchTotal":2},"messages":[{"id":"40543","messageId":"200704262237.16795.andyparkins@gmail.com","threadId":"7861","inReplyTo":null,"subject":"[PATCH 3/2] post-receive-email example hook: sed command for getting description was wrong","fromName":"Andy Parkins","fromEmail":"andyparkins@gmail.com","sentAt":"2007-04-26T21:37:16Z","receivedAt":"2007-04-26T21:37:16Z","isPatch":true,"sender":{"key":"andyparkins@gmail.com","avatar":null},"body":"The sed command that extracted the first line of the project description\ndidn't include the -n switch and hence the project name was being\nprinted twice.  This was ruining the email header generation because it\nwas assumed that the description was only one line and was included in\nthe subject.  This turned the subject into a two line item and\nprematurely finished the header.\n\nSigned-off-by: Andy Parkins <andyparkins@gmail.com>\n---\nOops - patch 3 in my series of 2.  Tee hee.\n\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 e175b42..d1bef91 100644\n--- a/contrib/hooks/post-receive-email\n+++ b/contrib/hooks/post-receive-email\n@@ -587,7 +587,7 @@ if [ -z \"$GIT_DIR\" ]; then\n \texit 1\n fi\n \n-projectdesc=$(sed -e '1p' \"$GIT_DIR/description\")\n+projectdesc=$(sed -ne '1p' \"$GIT_DIR/description\")\n # Check if the description is unchanged from it's default, and shorten it to a\n # more manageable length if it is\n if expr \"$projectdesc\" : \"Unnamed repository.*$\" >/dev/null\n-- \n1.5.2.rc0.744.g33910\n"}]}