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 9a2b8e249a.
This commit is contained in:
Loic d'Anterroches 2008-08-02 09:38:06 +02:00
parent fd6031d7f5
commit 4c5bd8d2be
2 changed files with 5 additions and 1 deletions

View File

@ -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);

View File

@ -17,6 +17,7 @@
<tr>
<th><strong>{trans 'Message:'}</strong></th><td>{issuetext $cobject.title, $project}{if isset($cobject.full_message)}<br /><br />{issuetext $cobject.full_message, $project}{/if}</td>
</tr>
{if count($diff.files)}
<tr>
<th><strong>{trans 'Files:'}</strong></th>
<td>
@ -26,11 +27,13 @@
{/foreach}
</td>
</tr>
{/if}
</table>
{if count($diff.files)}
<h2>{trans 'Change Details'}</h2>
{$diff.as_html()|safe}
{/if}
{/block}
{block context}
<p><strong>{trans 'Branches:'}</strong><br />