Skip to content

Commit

Permalink
post-receive-email example hook: sed command for getting description …
Browse files Browse the repository at this point in the history
…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>
  • Loading branch information
Andy Parkins authored and Junio C Hamano committed Apr 27, 2007
1 parent 024e5b3 commit c855195
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion contrib/hooks/post-receive-email
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c855195

Please sign in to comment.