From: Aneesh Kumar K.V Date: Fri, 27 Oct 2006 08:58:56 GMT Subject: Re: gitweb.cgi and git instaweb Message-ID: <4541CA50.6060901@gmail.com> In-Reply-To: <7v8xj2i6hb.fsf@assigned-by-dhcp.cox.net> Junio C Hamano wrote: > "Aneesh Kumar K.V" writes: > >> Aneesh Kumar K.V wrote: >>> I am getting errors as below with git instaweb. >>> >>> >>> kvaneesh@satan:/home/opensource/vanilla/linux-2.6-git$ git instaweb >>> 2006-10-27 00:12:56: (log.c.75) server started >>> kvaneesh@satan:/home/opensource/vanilla/linux-2.6-git$ [Fri Oct 27 >>> 00:12:57 2006] gitweb.cgi: "our" variable $stylesheet masks earlier >>> declaration in same scope at >>> >> The attached patch should fix it. >> >> -aneesh >> diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl >> index ba7a42a..1962c76 100755 >> --- a/gitweb/gitweb.perl >> +++ b/gitweb/gitweb.perl >> @@ -55,8 +55,6 @@ our $stylesheet; >> # default is not to define style sheet, but it can be overwritten later >> undef $stylesheet; >> >> -# URI of default stylesheet >> -our $stylesheet = "++GITWEB_CSS++"; >> # URI of GIT logo (72x27 size) >> our $logo = "++GITWEB_LOGO++"; >> # URI of GIT favicon, assumed to be image/png type > > Removing the extraneous undef would also be a good idea, > wouldn't it? > > diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl > index aceaeb7..7999b1a 100755 > --- a/gitweb/gitweb.perl > +++ b/gitweb/gitweb.perl > @@ -51,12 +51,10 @@ our $site_footer = "++GITWEB_SITE_FOOTER > > # URI of stylesheets > our @stylesheets = ("++GITWEB_CSS++"); > -our $stylesheet; > -# default is not to define style sheet, but it can be overwritten later > -undef $stylesheet; > - > # URI of default stylesheet > -our $stylesheet = "++GITWEB_CSS++"; > +# default is not to define style sheet, but it can be overwritten later. > +our $stylesheet = undef; > + > # URI of GIT logo (72x27 size) > our $logo = "++GITWEB_LOGO++"; > # URI of GIT favicon, assumed to be image/png type > ACK