gitweb: Fix "Use of uninitialized value" warning in git_feed
Initial (root) commit has no parents, and $co{'parent'} is undefined. Use '--root' for initial commit. This fixes "Use of uninitialized value in open at gitweb/gitweb.perl line 4925." warning. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
parent
c0e9892637
commit
c906b18122
@ -5040,7 +5040,8 @@ XML
|
||||
|
||||
# get list of changed files
|
||||
open my $fd, "-|", git_cmd(), "diff-tree", '-r', @diff_opts,
|
||||
$co{'parent'}, $co{'id'}, "--", (defined $file_name ? $file_name : ())
|
||||
$co{'parent'} || "--root",
|
||||
$co{'id'}, "--", (defined $file_name ? $file_name : ())
|
||||
or next;
|
||||
my @difftree = map { chomp; $_ } <$fd>;
|
||||
close $fd
|
||||
|
Loading…
Reference in New Issue
Block a user