diff options
author | Jakub Narebski <jnareb@gmail.com> | 2007-05-19 04:47:51 +0400 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2007-05-19 06:49:45 +0400 |
commit | c906b18122af72a8219c76281473490f812e5a40 (patch) | |
tree | 5d521f8fc930b4b7526c8e867819b6b057c1a518 | |
parent | c0e9892637e8144f10f2c408e276a470520f3601 (diff) |
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>
-rwxr-xr-x | gitweb/gitweb.perl | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl index 17d8efb29c..5c7011a37b 100755 --- a/gitweb/gitweb.perl +++ b/gitweb/gitweb.perl @@ -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 |