~edwargix/git.sr.ht

b4f34988f6b0fa770756ab8531590e3a0657d1a3 — Drew DeVault 6 years ago dc83839
Fix issue when commit cannot be found
2 files changed, 3 insertions(+), 0 deletions(-)

M gitsrht/git.py
M gitsrht/templates/blob.html
M gitsrht/git.py => gitsrht/git.py +1 -0
@@ 48,6 48,7 @@ class AnnotatedTreeEntry:
    def __init__(self, repo, entry):
        self._entry = entry
        self._repo = repo
        self.commit = None
        if entry:
            self.id = entry.id.hex
            self.name = entry.name

M gitsrht/templates/blob.html => gitsrht/templates/blob.html +2 -0
@@ 32,6 32,7 @@
        </a>
      </span>
    </span>
    {% if commit %}
    <div class="pull-right">
      <a href="#">{{commit.id.hex[:8]}}</a> &mdash;
      <a href="#">{{commit.author.name}}</a>:


@@ 41,6 42,7 @@
      </span>
    </div>
    <div class="clearfix"></div>
    {% endif %}
  </div>
</div>
<div class="container-fluid">