Re: [PATCH] gitweb: Fix @git_base_url_list usage

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

 



Dear diary, on Wed, Sep 20, 2006 at 02:28:28AM CEST, I got a letter
where Junio C Hamano <junkio@xxxxxxx> said that...
> Petr Baudis <pasky@xxxxxxx> writes:
> 
> > As it is now, that array was never used because the customurl accessor was
> > broken and ''unless @url_list'' never happenned.
> >
> > Signed-off-by: Petr Baudis <pasky@xxxxxxx>
> > ---
> >...
> >  sub git_get_project_url_list {
> >  	my $path = shift;
> >  
> > -	open my $fd, "$projectroot/$path/cloneurl" or return undef;
> > +	open my $fd, "$projectroot/$path/cloneurl" or return wantarray ? () : undef;
> >  	my @git_project_url_list = map { chomp; $_ } <$fd>;
> >  	close $fd;
> 
> Why on earth do you want to use wantarray for something like
> this?
> 
> It's not like you are implementinging any fancy DWIM magic.
> 
> Isn't
> 
> 	open my $fd, "foobar" or return;
> 
> much easier to read?

Sure, that's what I meant, I'm only already a bit tired so I just
mimicked the other return in that sub, sorry.

-- 
				Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
Snow falling on Perl. White noise covering line noise.
Hides all the bugs too. -- J. Putnam
-
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]