]> git.ipfire.org Git - thirdparty/git.git/commitdiff
post-receive-email: suppress error if description file missing
authorSitaram Chamarty <sitaramc@gmail.com>
Thu, 3 Feb 2011 01:00:32 +0000 (06:30 +0530)
committerJunio C Hamano <gitster@pobox.com>
Mon, 7 Feb 2011 22:28:21 +0000 (14:28 -0800)
Signed-off-by: Sitaram Chamarty <sitaramc@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
contrib/hooks/post-receive-email

index f99ea9585014face001849aeeefa5f20e79bc1e2..21989fc6ab84c0503cdc9418673d9d0bf06f9d49 100755 (executable)
@@ -709,7 +709,7 @@ if [ -z "$GIT_DIR" ]; then
        exit 1
 fi
 
-projectdesc=$(sed -ne '1p' "$GIT_DIR/description")
+projectdesc=$(sed -ne '1p' "$GIT_DIR/description" 2>/dev/null)
 # 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