summaryrefslogtreecommitdiff
path: root/contrib/hooks
diff options
context:
space:
mode:
authorAndy Parkins <andyparkins@gmail.com>2007-04-26 21:37:16 (GMT)
committerJunio C Hamano <junkio@cox.net>2007-04-27 03:59:55 (GMT)
commitc855195cd014f8b5a32a32b36cb77319654583a3 (patch)
tree90ccc8524d2cc87961d388d2d867f0bbc96b34c4 /contrib/hooks
parent024e5b31af6f06d39542ab1a44de358d7734388b (diff)
downloadgit-c855195cd014f8b5a32a32b36cb77319654583a3.zip
git-c855195cd014f8b5a32a32b36cb77319654583a3.tar.gz
git-c855195cd014f8b5a32a32b36cb77319654583a3.tar.bz2
post-receive-email example hook: sed command for getting description was wrong
The sed command that extracted the first line of the project description didn't include the -n switch and hence the project name was being printed twice. This was ruining the email header generation because it was assumed that the description was only one line and was included in the subject. This turned the subject into a two line item and prematurely finished the header. Signed-off-by: Andy Parkins <andyparkins@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'contrib/hooks')
-rw-r--r--contrib/hooks/post-receive-email2
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/hooks/post-receive-email b/contrib/hooks/post-receive-email
index e175b42..d1bef91 100644
--- a/contrib/hooks/post-receive-email
+++ b/contrib/hooks/post-receive-email
@@ -587,7 +587,7 @@ if [ -z "$GIT_DIR" ]; then
exit 1
fi
-projectdesc=$(sed -e '1p' "$GIT_DIR/description")
+projectdesc=$(sed -ne '1p' "$GIT_DIR/description")
# Check if the description is unchanged from it's default, and shorten it to a
# more manageable length if it is
if expr "$projectdesc" : "Unnamed repository.*$" >/dev/null