@matheusbsbs / matheus-bagliano / commits / c855195cd0
Fork 0

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>

Andy Parkins committed Apr 26, 2007 at 22:37 UTC c855195cd014f8b5a32a32b36cb77319654583a3
1 file changed +1 -1
contrib/hooks/post-receive-email
+1 -1
@@ -587,7 +587,7 @@ if [ -z "$GIT_DIR" ]; then
587 exit 1
588 fi
589
590 -projectdesc=$(sed -e '1p' "$GIT_DIR/description")
590 +projectdesc=$(sed -ne '1p' "$GIT_DIR/description")
591 # Check if the description is unchanged from it's default, and shorten it to a
592 # more manageable length if it is
593 if expr "$projectdesc" : "Unnamed repository.*$" >/dev/null