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:
parent
fd6031d7f5
commit
4c5bd8d2be
@ -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);
|
||||
|
@ -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 />
|
||||
|
Loading…
Reference in New Issue
Block a user