Re: [PATCH] post-receive-email: suppress error if description file missing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Sitaram Chamarty <sitaramc@xxxxxxxxx> writes:

> ---
>  contrib/hooks/post-receive-email |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/contrib/hooks/post-receive-email b/contrib/hooks/post-receive-email
> index f99ea95..71f2b47 100755
> --- a/contrib/hooks/post-receive-email
> +++ b/contrib/hooks/post-receive-email
> @@ -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 ;-)

>  # 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
> -- 
> 1.7.3.4
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]