git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] post-receive-email: suppress error if description file missing
@ 2011-02-02 17:42 Sitaram Chamarty
  2011-02-02 18:36 ` Junio C Hamano
  0 siblings, 1 reply; 3+ messages in thread
From: Sitaram Chamarty @ 2011-02-02 17:42 UTC (permalink / raw)
  Cc: Ralf Hemmecke, git

---
 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")
 # 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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] post-receive-email: suppress error if description file missing
  2011-02-02 17:42 [PATCH] post-receive-email: suppress error if description file missing Sitaram Chamarty
@ 2011-02-02 18:36 ` Junio C Hamano
  2011-02-03  1:00   ` Sitaram Chamarty
  0 siblings, 1 reply; 3+ messages in thread
From: Junio C Hamano @ 2011-02-02 18:36 UTC (permalink / raw)
  To: Sitaram Chamarty; +Cc: Ralf Hemmecke, git

Sitaram Chamarty <sitaramc@gmail.com> 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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] post-receive-email: suppress error if description file missing
  2011-02-02 18:36 ` Junio C Hamano
@ 2011-02-03  1:00   ` Sitaram Chamarty
  0 siblings, 0 replies; 3+ messages in thread
From: Sitaram Chamarty @ 2011-02-03  1:00 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Ralf Hemmecke, git

Signed-off-by: Sitaram Chamarty <sitaramc@gmail.com>
---

On Wed, Feb 02, 2011 at 10:36:43AM -0800, Junio C Hamano wrote:

> 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 :)

> You forgot to sign-off, though ;-)

done!

 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..21989fc 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)
 # 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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-02-03  1:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-02 17:42 [PATCH] post-receive-email: suppress error if description file missing Sitaram Chamarty
2011-02-02 18:36 ` Junio C Hamano
2011-02-03  1:00   ` Sitaram Chamarty

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).