<div class=tree>
  <h2>Tree @<a href="{{ url_for('commit', namespace=namespace, repo=repo.name, rev=rev) }}">{{ rev|shorten_sha1 }}</a>
    <span>(<a href="{{ url_for('download', namespace=namespace, repo=repo.name, rev=rev) }}">Download .tar.gz</a>)</span>
  </h2>
  <ul>
    {% for name, fullpath in root_tree.dirs %}
    <li><a href="{{ url_for('history', namespace=namespace, repo=repo.name, rev=rev, path=fullpath) }}" class=dir>{{ name }}</a></li>
    {% endfor %}
    {% for name, fullpath in root_tree.submodules %}
    <li><a href="{{ url_for('submodule', namespace=namespace, repo=repo.name, rev=rev, path=fullpath) }}" class=submodule>{{ name }}</a></li>
    {% endfor %}
    {% for name, fullpath in root_tree.files %}
    <li><a href="{{ url_for('blob', namespace=namespace, repo=repo.name, rev=rev, path=fullpath) }}">{{ name }}</a></li>
    {% endfor %}
  </ul>
</div>
