post-receive-email: suppress error if description file missing
PATCH 1/1 post-receive-email: suppress error if description file missing
--- contrib/hooks/post-receive-email | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
contrib/hooks/post-receive-email +1 -1
@@ -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
Signature · 1 line
1.7.3.4
Quoted 9 lines · Sitaram Chamarty
--- contrib/hooks/post-receive-email | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)contrib/hooks/post-receive-email +0
-0
contrib/hooks/post-receive-email if [ -z "$GIT_DIR" ]; then · line 712
Quoted 5 lines
contrib/hooks/post-receive-email +1
-1@@ -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")
I suspect that you would want to have the redirection outside the dq pair, but other than that, well spotted.
You forgot to sign-off, though ;-)
Quoted 5 lines
contrib/hooks/post-receive-email +0
-0# 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/nullSignature · 1 line
1.7.3.4
Signed-off-by Sitaram Chamarty <[email protected]>
---
Quoted 2 lines · Junio C Hamano
I suspect that you would want to have the redirection outside the dq pair, but other than that, well spotted.
doh! Thanks for catching the stupid error -- I shouldn't attempt even a simple patch when half-asleep I guess :)
Quoted 1 line
You forgot to sign-off, though ;-)
done!
contrib/hooks/post-receive-email | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
contrib/hooks/post-receive-email +1 -1
@@ -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
Signature · 1 line
1.7.3.4