{"thread":{"id":"12044","subject":"[PATCH] contrib/hooks/post-receive-email: checks for gitweb.description","startedAt":"2008-02-11T20:02:18Z","lastAt":"2008-02-11T21:49:57Z","messageCount":3,"participants":["Bruno Ribas","Jakub Narebski","BRUNO CESAR RIBAS"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"68434","messageId":"1202760138-24227-1-git-send-email-ribas@c3sl.ufpr.br","threadId":"12044","inReplyTo":null,"subject":"[PATCH] contrib/hooks/post-receive-email: checks for gitweb.description","fromName":"Bruno Ribas","fromEmail":"ribas@c3sl.ufpr.br","sentAt":"2008-02-11T20:02:18Z","receivedAt":"2008-02-11T20:02:18Z","isPatch":true,"sender":{"key":"ribas@c3sl.ufpr.br","avatar":null},"body":"\nSigned-off-by: Bruno Ribas <ribas@c3sl.ufpr.br>\n---\n contrib/hooks/post-receive-email |    6 +++++-\n 1 files changed, 5 insertions(+), 1 deletions(-)\n\ndiff --git a/contrib/hooks/post-receive-email b/contrib/hooks/post-receive-email\nindex 77c88eb..bdd21fa 100644\n--- a/contrib/hooks/post-receive-email\n+++ b/contrib/hooks/post-receive-email\n@@ -614,7 +614,11 @@ if [ -z \"$GIT_DIR\" ]; then\n \texit 1\n fi\n \n-projectdesc=$(sed -ne '1p' \"$GIT_DIR/description\")\n+if [ -f \"$GIT_DIR/description\" ]; then\n+\tprojectdesc=$(sed -ne '1p' \"$GIT_DIR/description\")\n+else\n+\tprojectdesc=$(git-config gitweb.description)\n+fi\n # Check if the description is unchanged from it's default, and shorten it to\n # a more manageable length if it is\n if expr \"$projectdesc\" : \"Unnamed repository.*$\" >/dev/null\n-- \n1.5.4.24.gce08d\n"},{"id":"68443","messageId":"m3ejbjdwc6.fsf@localhost.localdomain","threadId":"12044","inReplyTo":"1202760138-24227-1-git-send-email-ribas@c3sl.ufpr.br","subject":"Re: [PATCH] contrib/hooks/post-receive-email: checks for gitweb.description","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2008-02-11T21:20:21Z","receivedAt":"2008-02-11T21:20:21Z","isPatch":true,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Bruno Ribas <ribas@c3sl.ufpr.br> writes:\n\nHere it would be nice to have longer description, like:\n\n  Check repository configuration gitweb.description for project\n  description, if $GIT_DIR/description does not exist\n\nNote that 'description' file is created by default when creating\nrepository by git-init by default repo template.\n\n> Signed-off-by: Bruno Ribas <ribas@c3sl.ufpr.br>\n> ---\n>  contrib/hooks/post-receive-email |    6 +++++-\n>  1 files changed, 5 insertions(+), 1 deletions(-)\n> \n> diff --git a/contrib/hooks/post-receive-email b/contrib/hooks/post-receive-email\n> index 77c88eb..bdd21fa 100644\n> --- a/contrib/hooks/post-receive-email\n> +++ b/contrib/hooks/post-receive-email\n> @@ -614,7 +614,11 @@ if [ -z \"$GIT_DIR\" ]; then\n>  \texit 1\n>  fi\n>  \n> -projectdesc=$(sed -ne '1p' \"$GIT_DIR/description\")\n> +if [ -f \"$GIT_DIR/description\" ]; then\n> +\tprojectdesc=$(sed -ne '1p' \"$GIT_DIR/description\")\n> +else\n> +\tprojectdesc=$(git-config gitweb.description)\n\nThe rest of this hook use \"git cmd\". Preferred way to call git\ncommands is \"git cmd\". So I would use\n\n  \"git config gitweb.description\"\n\n> +fi\n>  # Check if the description is unchanged from it's default, and shorten it to\n>  # a more manageable length if it is\n>  if expr \"$projectdesc\" : \"Unnamed repository.*$\" >/dev/null\n> -- \n> 1.5.4.24.gce08d\n> \n\n-- \nJakub Narebski\nPoland\nShadeHawk on #git\n"},{"id":"68448","messageId":"20080211214957.GA20469@c3sl.ufpr.br","threadId":"12044","inReplyTo":"m3ejbjdwc6.fsf@localhost.localdomain","subject":"Re: [PATCH] contrib/hooks/post-receive-email: checks for gitweb.description","fromName":"BRUNO CESAR RIBAS","fromEmail":"ribas@c3sl.ufpr.br","sentAt":"2008-02-11T21:49:57Z","receivedAt":"2008-02-11T21:49:57Z","isPatch":true,"sender":{"key":"ribas@c3sl.ufpr.br","avatar":null},"body":"On Mon, Feb 11, 2008 at 01:20:21PM -0800, Jakub Narebski wrote:\n> Bruno Ribas <ribas@c3sl.ufpr.br> writes:\n> \n> Here it would be nice to have longer description, like:\n> \n>   Check repository configuration gitweb.description for project\n>   description, if $GIT_DIR/description does not exist\n\nOkay, I'll resend =)\n\n> \n> Note that 'description' file is created by default when creating\n> repository by git-init by default repo template.\n\nYep, but when we use the gitweb.description we have do rm description file,\nAs seen on gitweb.perl it falls back to gitweb.description only when we can't\nopen description file.\n\nhmm... With this patch i am not assuming someone set description file to mode\n000, i think is better not to imaginade someone would do this, or not?\n\n> \n> > Signed-off-by: Bruno Ribas <ribas@c3sl.ufpr.br>\n> > ---\n> >  contrib/hooks/post-receive-email |    6 +++++-\n> >  1 files changed, 5 insertions(+), 1 deletions(-)\n> > \n> > diff --git a/contrib/hooks/post-receive-email b/contrib/hooks/post-receive-email\n> > index 77c88eb..bdd21fa 100644\n> > --- a/contrib/hooks/post-receive-email\n> > +++ b/contrib/hooks/post-receive-email\n> > @@ -614,7 +614,11 @@ if [ -z \"$GIT_DIR\" ]; then\n> >  \texit 1\n> >  fi\n> >  \n> > -projectdesc=$(sed -ne '1p' \"$GIT_DIR/description\")\n> > +if [ -f \"$GIT_DIR/description\" ]; then\n> > +\tprojectdesc=$(sed -ne '1p' \"$GIT_DIR/description\")\n> > +else\n> > +\tprojectdesc=$(git-config gitweb.description)\n> \n> The rest of this hook use \"git cmd\". Preferred way to call git\n> commands is \"git cmd\". So I would use\n> \n>   \"git config gitweb.description\"\n> \n> > +fi\n> >  # Check if the description is unchanged from it's default, and shorten it to\n> >  # a more manageable length if it is\n> >  if expr \"$projectdesc\" : \"Unnamed repository.*$\" >/dev/null\n> > -- \n> > 1.5.4.24.gce08d\n> > \n> \n> -- \n> Jakub Narebski\n> Poland\n> ShadeHawk on #git\n> -\n> To unsubscribe from this list: send the line \"unsubscribe git\" in\n> the body of a message to majordomo@vger.kernel.org\n> More majordomo info at  http://vger.kernel.org/majordomo-info.html\n"}]}