{# SPDX-FileCopyrightText: 2026 rishmadaan SPDX-License-Identifier: GPL-3.0-or-later #} {# The repo page's "Local changes" tab: files edited, staged or untracked in this folder. #}
{% if inc.status_error %}
Could not read local changes: the read of this repo failed (git's message is on the Incoming tab). Nothing here is shown as clean.
{% elif changes is not none and changes.error %}{# an error-holding ChangedFiles is falsy #}
Could not read local changes: {{ changes.error }} Nothing here is shown as clean.
{% elif not changes %}
No local changes: nothing edited, staged or untracked in this folder{% if inc.result and inc.result.op == 'pulled' %} (re-read after the pull){% endif %}.
{% else %} {% set cap = 200 %} {% for group, files in [("staged", changes.staged), ("unstaged", changes.unstaged)] %} {% if files %}
{{ group }} {{ files|length }}
{% for f in files[:cap] %}
{{ f.kind[0]|upper }} {% if f.old_path %}{{ f.old_path }} → {% endif %}{{ f.path }} {% if f.path in inc.local_overlap %}this update changes this too{% endif %} {% if f.binary %}binary {% else %}+{{ f.added }} −{{ f.removed }}{% endif %}
loading…
{% endfor %} {% if files|length > cap %}
showing first {{ cap }} of {{ files|length }} — full list in a terminal via git status
{% endif %}
{% endif %} {% endfor %} {% if changes.untracked %}
untracked {{ changes.untracked|length }}
{% for path in changes.untracked[:cap] %}
U {{ path }} {% if path in inc.local_overlap %}this update brings a file with this name{% endif %} new
loading…
{% endfor %} {% if changes.untracked|length > cap %}
showing first {{ cap }} of {{ changes.untracked|length }} — full list in a terminal via git status
{% endif %}
{% endif %} {% endif %}