* [PATCH] gitweb: Fix few 'use of undefined value' warnings
@ 2007-04-27 16:43 Petr Baudis
2007-04-29 6:49 ` Junio C Hamano
2007-05-17 1:32 ` Petr Baudis
0 siblings, 2 replies; 5+ messages in thread
From: Petr Baudis @ 2007-04-27 16:43 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
Signed-off-by: Petr Baudis <pasky@suse.cz>
---
gitweb/gitweb.perl | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index b67ce41..b51103e 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -1038,6 +1038,7 @@ sub git_get_hash_by_path {
or die_error(undef, "Open git-ls-tree failed");
my $line = <$fd>;
close $fd or return undef;
+ $line or return undef;
#'100644 blob 0fa3f3a66fb6a137f6ec2c19351ed4d807070ffa panic.c'
$line =~ m/^([0-9]+) (.+) ([0-9a-fA-F]{40})\t/;
@@ -1057,6 +1058,7 @@ sub git_get_project_description {
open my $fd, "$projectroot/$path/description" or return undef;
my $descr = <$fd>;
close $fd;
+ $descr or return undef;
chomp $descr;
return $descr;
}
@@ -1208,6 +1210,7 @@ sub git_get_last_activity {
'refs/heads') or return;
my $most_recent = <$fd>;
close $fd or return;
+ $most_recent or return;
if ($most_recent =~ / (\d+) [-+][01]\d\d\d$/) {
my $timestamp = $1;
my $age = time - $timestamp;
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] gitweb: Fix few 'use of undefined value' warnings
2007-04-27 16:43 [PATCH] gitweb: Fix few 'use of undefined value' warnings Petr Baudis
@ 2007-04-29 6:49 ` Junio C Hamano
2007-05-17 1:32 ` Petr Baudis
1 sibling, 0 replies; 5+ messages in thread
From: Junio C Hamano @ 2007-04-29 6:49 UTC (permalink / raw)
To: Petr Baudis; +Cc: git
thanks.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] gitweb: Fix few 'use of undefined value' warnings
2007-04-27 16:43 [PATCH] gitweb: Fix few 'use of undefined value' warnings Petr Baudis
2007-04-29 6:49 ` Junio C Hamano
@ 2007-05-17 1:32 ` Petr Baudis
2007-05-17 4:05 ` Junio C Hamano
1 sibling, 1 reply; 5+ messages in thread
From: Petr Baudis @ 2007-05-17 1:32 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
On Fri, Apr 27, 2007 at 06:43:53PM CEST, Petr Baudis wrote:
> diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
> index b67ce41..b51103e 100755
> --- a/gitweb/gitweb.perl
> +++ b/gitweb/gitweb.perl
> @@ -1057,6 +1058,7 @@ sub git_get_project_description {
> open my $fd, "$projectroot/$path/description" or return undef;
> my $descr = <$fd>;
> close $fd;
> + $descr or return undef;
> chomp $descr;
> return $descr;
> }
It looks like this hunk has been skipped...?
--
Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
Ever try. Ever fail. No matter. // Try again. Fail again. Fail better.
-- Samuel Beckett
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] gitweb: Fix few 'use of undefined value' warnings
2007-05-17 1:32 ` Petr Baudis
@ 2007-05-17 4:05 ` Junio C Hamano
2007-05-17 11:25 ` Petr Baudis
0 siblings, 1 reply; 5+ messages in thread
From: Junio C Hamano @ 2007-05-17 4:05 UTC (permalink / raw)
To: Petr Baudis; +Cc: git
Petr Baudis <pasky@suse.cz> writes:
> On Fri, Apr 27, 2007 at 06:43:53PM CEST, Petr Baudis wrote:
>> diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
>> index b67ce41..b51103e 100755
>> --- a/gitweb/gitweb.perl
>> +++ b/gitweb/gitweb.perl
>> @@ -1057,6 +1058,7 @@ sub git_get_project_description {
>> open my $fd, "$projectroot/$path/description" or return undef;
>> my $descr = <$fd>;
>> close $fd;
>> + $descr or return undef;
>> chomp $descr;
>> return $descr;
>> }
>
> It looks like this hunk has been skipped...?
It is more like the whole messages was missed, and then 198a2a8a
and others tried to do the same thing but missed this one.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] gitweb: Fix few 'use of undefined value' warnings
2007-05-17 4:05 ` Junio C Hamano
@ 2007-05-17 11:25 ` Petr Baudis
0 siblings, 0 replies; 5+ messages in thread
From: Petr Baudis @ 2007-05-17 11:25 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
On Thu, May 17, 2007 at 06:05:06AM CEST, Junio C Hamano wrote:
> Petr Baudis <pasky@suse.cz> writes:
>
> > On Fri, Apr 27, 2007 at 06:43:53PM CEST, Petr Baudis wrote:
> >> diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
> >> index b67ce41..b51103e 100755
> >> --- a/gitweb/gitweb.perl
> >> +++ b/gitweb/gitweb.perl
> >> @@ -1057,6 +1058,7 @@ sub git_get_project_description {
> >> open my $fd, "$projectroot/$path/description" or return undef;
> >> my $descr = <$fd>;
> >> close $fd;
> >> + $descr or return undef;
> >> chomp $descr;
> >> return $descr;
> >> }
> >
> > It looks like this hunk has been skipped...?
>
> It is more like the whole messages was missed, and then 198a2a8a
> and others tried to do the same thing but missed this one.
Oh, aha - I thought that it was applied when you replied "thanks"...
--
Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
Ever try. Ever fail. No matter. // Try again. Fail again. Fail better.
-- Samuel Beckett
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2007-05-17 11:25 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-27 16:43 [PATCH] gitweb: Fix few 'use of undefined value' warnings Petr Baudis
2007-04-29 6:49 ` Junio C Hamano
2007-05-17 1:32 ` Petr Baudis
2007-05-17 4:05 ` Junio C Hamano
2007-05-17 11:25 ` Petr Baudis
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).