* [PATCH] contrib/hooks/post-receive-email: checks for gitweb.description
@ 2008-02-11 20:02 Bruno Ribas
2008-02-11 21:20 ` Jakub Narebski
0 siblings, 1 reply; 8+ messages in thread
From: Bruno Ribas @ 2008-02-11 20:02 UTC (permalink / raw)
To: git; +Cc: gitster, Bruno Ribas
Signed-off-by: Bruno Ribas <ribas@c3sl.ufpr.br>
---
contrib/hooks/post-receive-email | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/contrib/hooks/post-receive-email b/contrib/hooks/post-receive-email
index 77c88eb..bdd21fa 100644
--- a/contrib/hooks/post-receive-email
+++ b/contrib/hooks/post-receive-email
@@ -614,7 +614,11 @@ if [ -z "$GIT_DIR" ]; then
exit 1
fi
-projectdesc=$(sed -ne '1p' "$GIT_DIR/description")
+if [ -f "$GIT_DIR/description" ]; then
+ projectdesc=$(sed -ne '1p' "$GIT_DIR/description")
+else
+ projectdesc=$(git-config gitweb.description)
+fi
# 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.5.4.24.gce08d
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH] contrib/hooks/post-receive-email: checks for gitweb.description
2008-02-11 20:02 Bruno Ribas
@ 2008-02-11 21:20 ` Jakub Narebski
2008-02-11 21:49 ` BRUNO CESAR RIBAS
0 siblings, 1 reply; 8+ messages in thread
From: Jakub Narebski @ 2008-02-11 21:20 UTC (permalink / raw)
To: Bruno Ribas; +Cc: git, Junio C Hamano
Bruno Ribas <ribas@c3sl.ufpr.br> writes:
Here it would be nice to have longer description, like:
Check repository configuration gitweb.description for project
description, if $GIT_DIR/description does not exist
Note that 'description' file is created by default when creating
repository by git-init by default repo template.
> Signed-off-by: Bruno Ribas <ribas@c3sl.ufpr.br>
> ---
> contrib/hooks/post-receive-email | 6 +++++-
> 1 files changed, 5 insertions(+), 1 deletions(-)
>
> diff --git a/contrib/hooks/post-receive-email b/contrib/hooks/post-receive-email
> index 77c88eb..bdd21fa 100644
> --- a/contrib/hooks/post-receive-email
> +++ b/contrib/hooks/post-receive-email
> @@ -614,7 +614,11 @@ if [ -z "$GIT_DIR" ]; then
> exit 1
> fi
>
> -projectdesc=$(sed -ne '1p' "$GIT_DIR/description")
> +if [ -f "$GIT_DIR/description" ]; then
> + projectdesc=$(sed -ne '1p' "$GIT_DIR/description")
> +else
> + projectdesc=$(git-config gitweb.description)
The rest of this hook use "git cmd". Preferred way to call git
commands is "git cmd". So I would use
"git config gitweb.description"
> +fi
> # 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.5.4.24.gce08d
>
--
Jakub Narebski
Poland
ShadeHawk on #git
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] contrib/hooks/post-receive-email: checks for gitweb.description
2008-02-11 21:20 ` Jakub Narebski
@ 2008-02-11 21:49 ` BRUNO CESAR RIBAS
0 siblings, 0 replies; 8+ messages in thread
From: BRUNO CESAR RIBAS @ 2008-02-11 21:49 UTC (permalink / raw)
To: Jakub Narebski; +Cc: git, Junio C Hamano
On Mon, Feb 11, 2008 at 01:20:21PM -0800, Jakub Narebski wrote:
> Bruno Ribas <ribas@c3sl.ufpr.br> writes:
>
> Here it would be nice to have longer description, like:
>
> Check repository configuration gitweb.description for project
> description, if $GIT_DIR/description does not exist
Okay, I'll resend =)
>
> Note that 'description' file is created by default when creating
> repository by git-init by default repo template.
Yep, but when we use the gitweb.description we have do rm description file,
As seen on gitweb.perl it falls back to gitweb.description only when we can't
open description file.
hmm... With this patch i am not assuming someone set description file to mode
000, i think is better not to imaginade someone would do this, or not?
>
> > Signed-off-by: Bruno Ribas <ribas@c3sl.ufpr.br>
> > ---
> > contrib/hooks/post-receive-email | 6 +++++-
> > 1 files changed, 5 insertions(+), 1 deletions(-)
> >
> > diff --git a/contrib/hooks/post-receive-email b/contrib/hooks/post-receive-email
> > index 77c88eb..bdd21fa 100644
> > --- a/contrib/hooks/post-receive-email
> > +++ b/contrib/hooks/post-receive-email
> > @@ -614,7 +614,11 @@ if [ -z "$GIT_DIR" ]; then
> > exit 1
> > fi
> >
> > -projectdesc=$(sed -ne '1p' "$GIT_DIR/description")
> > +if [ -f "$GIT_DIR/description" ]; then
> > + projectdesc=$(sed -ne '1p' "$GIT_DIR/description")
> > +else
> > + projectdesc=$(git-config gitweb.description)
>
> The rest of this hook use "git cmd". Preferred way to call git
> commands is "git cmd". So I would use
>
> "git config gitweb.description"
>
> > +fi
> > # 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.5.4.24.gce08d
> >
>
> --
> Jakub Narebski
> Poland
> ShadeHawk on #git
> -
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH] contrib/hooks/post-receive-email: checks for gitweb.description
@ 2008-02-12 3:25 Bruno Ribas
2008-02-12 8:17 ` Jakub Narebski
0 siblings, 1 reply; 8+ messages in thread
From: Bruno Ribas @ 2008-02-12 3:25 UTC (permalink / raw)
To: git; +Cc: gitster, Bruno Ribas
Check repository configuration gitweb.description for project description,
if $GIT_DIR/description does not exist
Signed-off-by: Bruno Ribas <ribas@c3sl.ufpr.br>
---
contrib/hooks/post-receive-email | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/contrib/hooks/post-receive-email b/contrib/hooks/post-receive-email
index 77c88eb..bdd21fa 100644
--- a/contrib/hooks/post-receive-email
+++ b/contrib/hooks/post-receive-email
@@ -614,7 +614,11 @@ if [ -z "$GIT_DIR" ]; then
exit 1
fi
-projectdesc=$(sed -ne '1p' "$GIT_DIR/description")
+if [ -f "$GIT_DIR/description" ]; then
+ projectdesc=$(sed -ne '1p' "$GIT_DIR/description")
+else
+ projectdesc=$(git-config gitweb.description)
+fi
# 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.5.4.24.gce08d
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH] contrib/hooks/post-receive-email: checks for gitweb.description
2008-02-12 3:25 [PATCH] contrib/hooks/post-receive-email: checks for gitweb.description Bruno Ribas
@ 2008-02-12 8:17 ` Jakub Narebski
2008-02-13 0:24 ` Bruno Cesar Ribas
0 siblings, 1 reply; 8+ messages in thread
From: Jakub Narebski @ 2008-02-12 8:17 UTC (permalink / raw)
To: Bruno Ribas; +Cc: git, Junio C Hamano
Bruno Ribas <ribas@c3sl.ufpr.br> writes:
> -projectdesc=$(sed -ne '1p' "$GIT_DIR/description")
> +if [ -f "$GIT_DIR/description" ]; then
> + projectdesc=$(sed -ne '1p' "$GIT_DIR/description")
> +else
> + projectdesc=$(git-config gitweb.description)
+ projectdesc=$(git config gitweb.description)
> +fi
> # 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.5.4.24.gce08d
(but this can be fixed when applying).
--
Jakub Narebski
Poland
ShadeHawk on #git
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] contrib/hooks/post-receive-email: checks for gitweb.description
2008-02-12 8:17 ` Jakub Narebski
@ 2008-02-13 0:24 ` Bruno Cesar Ribas
2008-02-18 3:46 ` Bruno Cesar Ribas
0 siblings, 1 reply; 8+ messages in thread
From: Bruno Cesar Ribas @ 2008-02-13 0:24 UTC (permalink / raw)
To: Jakub Narebski; +Cc: git, Junio C Hamano
I can resend with no problem =)
On Tue, Feb 12, 2008 at 12:17:57AM -0800, Jakub Narebski wrote:
> Bruno Ribas <ribas@c3sl.ufpr.br> writes:
>
> > -projectdesc=$(sed -ne '1p' "$GIT_DIR/description")
> > +if [ -f "$GIT_DIR/description" ]; then
> > + projectdesc=$(sed -ne '1p' "$GIT_DIR/description")
> > +else
> > + projectdesc=$(git-config gitweb.description)
>
> + projectdesc=$(git config gitweb.description)
>
> > +fi
> > # 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.5.4.24.gce08d
>
> (but this can be fixed when applying).
>
> --
> Jakub Narebski
> Poland
> ShadeHawk on #git
> -
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
Bruno Ribas - ribas@c3sl.ufpr.br
http://web.inf.ufpr.br/ribas
C3SL: http://www.c3sl.ufpr.br
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] contrib/hooks/post-receive-email: checks for gitweb.description
2008-02-13 0:24 ` Bruno Cesar Ribas
@ 2008-02-18 3:46 ` Bruno Cesar Ribas
2008-02-18 6:03 ` Junio C Hamano
0 siblings, 1 reply; 8+ messages in thread
From: Bruno Cesar Ribas @ 2008-02-18 3:46 UTC (permalink / raw)
To: Jakub Narebski; +Cc: git, Junio C Hamano
Forgoten?! 8^)
On Tue, Feb 12, 2008 at 10:24:40PM -0200, Bruno Cesar Ribas wrote:
> I can resend with no problem =)
>
> On Tue, Feb 12, 2008 at 12:17:57AM -0800, Jakub Narebski wrote:
> > Bruno Ribas <ribas@c3sl.ufpr.br> writes:
> >
> > > -projectdesc=$(sed -ne '1p' "$GIT_DIR/description")
> > > +if [ -f "$GIT_DIR/description" ]; then
> > > + projectdesc=$(sed -ne '1p' "$GIT_DIR/description")
> > > +else
> > > + projectdesc=$(git-config gitweb.description)
> >
> > + projectdesc=$(git config gitweb.description)
> >
> > > +fi
> > > # 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.5.4.24.gce08d
> >
> > (but this can be fixed when applying).
> >
> > --
> > Jakub Narebski
> > Poland
> > ShadeHawk on #git
> > -
> > To unsubscribe from this list: send the line "unsubscribe git" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at http://vger.kernel.org/majordomo-info.html
>
> --
> Bruno Ribas - ribas@c3sl.ufpr.br
> http://web.inf.ufpr.br/ribas
> C3SL: http://www.c3sl.ufpr.br
> -
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
Bruno Ribas - ribas@c3sl.ufpr.br
http://web.inf.ufpr.br/ribas
C3SL: http://www.c3sl.ufpr.br
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] contrib/hooks/post-receive-email: checks for gitweb.description
2008-02-18 3:46 ` Bruno Cesar Ribas
@ 2008-02-18 6:03 ` Junio C Hamano
0 siblings, 0 replies; 8+ messages in thread
From: Junio C Hamano @ 2008-02-18 6:03 UTC (permalink / raw)
To: Bruno Cesar Ribas; +Cc: Jakub Narebski, git
Bruno Cesar Ribas <ribas@c3sl.ufpr.br> writes:
> Forgoten?! 8^)
> On Tue, Feb 12, 2008 at 10:24:40PM -0200, Bruno Cesar Ribas wrote:
>> I can resend with no problem =)
More like "not so much interested myself, although I did not
have strong objection either".
Typically original author or people who would see much value in
the patch than myself have more incentive and motivation to keep
pushing for inclusion of such a patch, so I tend to trust them
to re-send saying "Here is the final for inclusion, the list
concensus was favorable, and I addressed all the issues raised
during the discussion." if they still care about the patch than
actively fishing for old patches from my mailbox.
On the other hand if such re-push never happens that is a good
indication that nobody is convinced strongly enough to stand
behind the patch, and my time is better spent elsewhere.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2008-02-18 6:04 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-12 3:25 [PATCH] contrib/hooks/post-receive-email: checks for gitweb.description Bruno Ribas
2008-02-12 8:17 ` Jakub Narebski
2008-02-13 0:24 ` Bruno Cesar Ribas
2008-02-18 3:46 ` Bruno Cesar Ribas
2008-02-18 6:03 ` Junio C Hamano
-- strict thread matches above, loose matches on Subject: below --
2008-02-11 20:02 Bruno Ribas
2008-02-11 21:20 ` Jakub Narebski
2008-02-11 21:49 ` BRUNO CESAR RIBAS
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).