post-receive-email: suppress error if description file missing
Signed-off-by: Sitaram Chamarty <sitaramc@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Sitaram Chamarty committed
Feb 3, 2011 at 06:30 UTC
80aa55b40ba36a4d0c43d6348a2831b0c6f17e62
1 file changed
+1
-1
contrib/hooks/post-receive-email
+1
-1
@@ -709,7 +709,7 @@ if [ -z "$GIT_DIR" ]; then
709
exit 1
710
fi
711
712
-projectdesc=$(sed -ne '1p' "$GIT_DIR/description")
712
+projectdesc=$(sed -ne '1p' "$GIT_DIR/description" 2>/dev/null)
713
# Check if the description is unchanged from it's default, and shorten it to
714
# a more manageable length if it is
715
if expr "$projectdesc" : "Unnamed repository.*$" >/dev/null