summaryrefslogtreecommitdiff
path: root/IkiWiki/Rcs
diff options
context:
space:
mode:
authorJoey Hess <joey@kodama.kitenet.net>2007-11-12 12:53:46 -0500
committerJoey Hess <joey@kodama.kitenet.net>2007-11-12 12:53:46 -0500
commit8ffa59e6104be71b043b835920cb34d837b91fbf (patch)
tree869a4300335fe7e69c2c6c5c5df88db4aa1f0c58 /IkiWiki/Rcs
parent3c3135c6a8e3f0770c6efdb8c5765affedb61106 (diff)
* The first git commit legitimately has no parents. Avoid recentchanges
spewing uninitialised value warnings and debug messages about it. Dummying up a parent of 0000000 allows gitweb to work too.
Diffstat (limited to 'IkiWiki/Rcs')
-rw-r--r--IkiWiki/Rcs/git.pm10
1 files changed, 7 insertions, 3 deletions
diff --git a/IkiWiki/Rcs/git.pm b/IkiWiki/Rcs/git.pm
index dc79449a4..5507874e1 100644
--- a/IkiWiki/Rcs/git.pm
+++ b/IkiWiki/Rcs/git.pm
@@ -196,10 +196,14 @@ sub _parse_diff_tree ($@) { #{{{
}
}
- debug("No 'tree' or 'parents' seen in diff-tree output")
- if !defined $ci{'tree'} || !defined $ci{'parents'};
+ debug("No 'tree' seen in diff-tree output") if !defined $ci{'tree'};
- $ci{'parent'} = @{ $ci{'parents'} }[0] if defined $ci{'parents'};
+ if (defined $ci{'parents'}) {
+ $ci{'parent'} = @{ $ci{'parents'} }[0];
+ }
+ else {
+ $ci{'parent'} = 0 x 40;
+ }
# Commit message.
while (my $line = shift @{ $dt_ref }) {