]> Lady’s Gitweb - Gitweb/commit
gitweb: SHA-1 in commit log message links to "object" view
authorJakub Narebski <redacted>
Sun, 10 Dec 2006 12:25:49 +0000 (13:25 +0100)
committerLady <redacted>
Mon, 6 Apr 2026 04:07:11 +0000 (00:07 -0400)
commitfdfc2948601e46a8fa62b09badedba56721f5a861564fd0fb3e77322be7dedb5
treed89511571775cfec5cc616d8714585e31ea9552ec4d86f8f99a65c8a34ef62d8
parenta08d722b087c8ed13483e8e1c71063e05a2a672878c9f52b1e24af516be97b5c
gitweb: SHA-1 in commit log message links to "object" view

Instead of checking if explicit SHA-1 in commit log message is sha1 of
commit and making link to "commit" view, make [fragment of] explicit
SHA-1 in commit log message link to "object" view.  While at it allow
to hyperlink also shortened SHA-1, from 8 characters up to full SHA-1,
instead of requiring full 40 characters of SHA-1.

This makes the following changes:

 * SHA-1 of objects which no longer exists, for example in commit
   cherry-picked from no longer existing temporary branch, or revert
   of commit in rebased branch, are no longer marked as such by not
   being made into hyperlink (and not having default hyperlink view:
   being underlined among others).  On the other hand it makes gitweb
   to not write error messages when object is not found to web serwer
   log; it also moves cost of getting type and SHA-1 validation to
   when link is clicked, and not only viewed.

 * SHA-1 of other objects: blobs, trees, tags are also hyperlinked
   and lead to appropriate view (although in the case of tags it is
   more natural to just use tag name).

 * You can put shortened SHA-1 of commit in the commit message, and it
   would be hyperlinked; it would be checked on clicking if abbrev is
   unique.

Signed-off-by: Jakub Narebski <redacted>
Signed-off-by: Junio C Hamano <redacted>
gitweb.perl
This page took 0.222241 seconds and 4 git commands to generate.