summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c0e9892)
raw | patch | inline | side by side (parent: c0e9892)
author | Jakub Narebski <jnareb@gmail.com> | |
Sat, 19 May 2007 00:47:51 +0000 (02:47 +0200) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Sat, 19 May 2007 02:49:45 +0000 (19:49 -0700) |
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>
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>
gitweb/gitweb.perl | patch | blob | history |
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 17d8efb29cfa99f4d3b8e3dfaa9aec45fcdd43bb..5c7011a37b2e4dab8c38de54a3e531d2fa16ddbe 100755 (executable)
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
# 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