From 4c5bd8d2be673c9d86d8b6b5108d551982491d5c Mon Sep 17 00:00:00 2001 From: Loic d'Anterroches Date: Sat, 2 Aug 2008 09:38:06 +0200 Subject: [PATCH] Fixed bug when looking at a commit which is a merge. When you merge you do not get always a diff of files. This fix correct that for the case of commit 9a2b8e249acad9f844. --- src/IDF/Diff.php | 1 + src/IDF/templates/source/commit.html | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/IDF/Diff.php b/src/IDF/Diff.php index 9a078e6..2f86fd0 100644 --- a/src/IDF/Diff.php +++ b/src/IDF/Diff.php @@ -46,6 +46,7 @@ class IDF_Diff $current_chunk = 0; $lline = 0; $rline = 0; + $files = array(); foreach ($this->lines as $line) { if (0 === strpos($line, 'diff --git a')) { $current_file = self::getFile($line); diff --git a/src/IDF/templates/source/commit.html b/src/IDF/templates/source/commit.html index 7cc9f48..b204474 100644 --- a/src/IDF/templates/source/commit.html +++ b/src/IDF/templates/source/commit.html @@ -17,6 +17,7 @@ {trans 'Message:'}{issuetext $cobject.title, $project}{if isset($cobject.full_message)}

{issuetext $cobject.full_message, $project}{/if} +{if count($diff.files)} {trans 'Files:'} @@ -26,11 +27,13 @@ {/foreach} +{/if} +{if count($diff.files)}

{trans 'Change Details'}

{$diff.as_html()|safe} - +{/if} {/block} {block context}

{trans 'Branches:'}