diff options
author | Joey Hess <joey@kodama.kitenet.net> | 2007-11-12 12:53:46 -0500 |
---|---|---|
committer | Joey Hess <joey@kodama.kitenet.net> | 2007-11-12 12:53:46 -0500 |
commit | 8ffa59e6104be71b043b835920cb34d837b91fbf (patch) | |
tree | 869a4300335fe7e69c2c6c5c5df88db4aa1f0c58 | |
parent | 3c3135c6a8e3f0770c6efdb8c5765affedb61106 (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.
-rw-r--r-- | IkiWiki/Rcs/git.pm | 10 | ||||
-rw-r--r-- | debian/changelog | 5 |
2 files changed, 11 insertions, 4 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 }) { diff --git a/debian/changelog b/debian/changelog index 7e2315b60..f57e43958 100644 --- a/debian/changelog +++ b/debian/changelog @@ -28,8 +28,11 @@ ikiwiki (2.12) UNRELEASED; urgency=low It needs to be setgid if the master repo is a shared repository, so that pushes into the working copy repository happen as the same group, avoiding permissions problems. + * 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. - -- Joey Hess <joeyh@debian.org> Mon, 12 Nov 2007 12:26:45 -0500 + -- Joey Hess <joeyh@debian.org> Mon, 12 Nov 2007 12:48:55 -0500 ikiwiki (2.11) unstable; urgency=low |