{% load url from future %}
{% load greta_tags %}
{% load code_tags %}

<h2 id="tree-paths">
  <a href="{% url 'tree_detail' pk=repo.pk ref=ref path="" %}">
    {{ repo.name|clean_repo_name }}/
  </a>
  {% for dir in path|subpaths %}
    {% if not forloop.last %}
      <a href="{% url 'tree_detail' pk=repo.pk ref=ref path=dir %}">
        {{ dir|basename }}/
      </a>
    {% endif %}

    {% if forloop.last %}
      {{ dir|basename }}
    {% endif %}
  {% endfor %}
</h2>

Clean up repository name in tree breadcrumb
Clean up repository name in tree breadcrumb
