| |
@@ -420,16 +420,13 @@
|
| |
<div class="text-muted text-xs-center">empty file added</div>
|
| |
</div>
|
| |
{% else %}
|
| |
- {% if patchtype == "added" %}
|
| |
- {% if (patch| hasattr('line_stats') and patch.line_stats[1] > 1000)
|
| |
- or (patch| hasattr('additions') and patch.additions > 1000) %}
|
| |
+ {% if patchtype == "added" and linesadded > 1000 %}
|
| |
<div class="card-block">
|
| |
<div class="text-muted text-xs-center">
|
| |
The added file is too large to be shown here, see it at:
|
| |
{{ viewfilelink(patch_new_file_path) }}
|
| |
</div>
|
| |
</div>
|
| |
- {% endif %}
|
| |
{% elif patchtype == "removed" %}
|
| |
<div class="card-block">
|
| |
<div class="text-muted text-xs-center">
|
| |
Commit https://pagure.io/pagure/c/b771bf3f4fa73e1f1544114bf799e3a2361feafa Fixed the issues for the multiple versions of pygit2 that we support, however it also introduced a bug where additions with < 1000 lines would not show anything (either a diff or a message saying too large).
Turns out we previously set a jinja variable that stored the linesadded amount (with support for multiple versions of libgit2), so this commit just uses that variable.