~edwargix/git.sr.ht

d370ef33abc15d58bf180e02b5346cab68cff950 — Noelle Leigh 3 years ago 644d32a
Fix link from commit to view commit in log

If a commit is old enough, it won't appear on the first page of the
git log, which means that the anchor in the URL won't work.

This change makes it so that the link always goes to a log page where
the commit is visible.

Note: This same change will fix the same issue for links on the log
page.
1 files changed, 1 insertions(+), 1 deletions(-)

M gitsrht/templates/utils.html
M gitsrht/templates/utils.html => gitsrht/templates/utils.html +1 -1
@@ 103,7 103,7 @@ endif %}{% endfor %}
    <a
      id="log-{{c.id}}"
      href="{{url_for("repo.log", owner=repo.owner.canonical_name,
        repo=repo.name)}}#log-{{c.id}}"
        repo=repo.name)}}?from={{c.id}}#log-{{c.id}}"
    >{{ commit_time(c) | date }}</a>
  </small>