git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] gitweb: recognize six digit abbreviated SHA1
@ 2009-01-13  0:04 Anders Melchiorsen
  2009-01-13  0:08 ` Anders Melchiorsen
  0 siblings, 1 reply; 5+ messages in thread
From: Anders Melchiorsen @ 2009-01-13  0:04 UTC (permalink / raw)
  To: git; +Cc: jnareb, gitster

This lets gitweb hightlight abbreviated hashes as produced by
git rev-parse --short.

Signed-off-by: Anders Melchiorsen <mail@cup.kalibalik.dk>
---

It seems like seven digit hashes are in vogue now. So, did I miss some
reason for keeping it at eight in this spot?


diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 0ac84d1..1a7d448 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -1337,7 +1337,7 @@ sub format_log_line_html {
 	my $line = shift;
 
 	$line = esc_html($line, -nbsp=>1);
-	if ($line =~ m/([0-9a-fA-F]{8,40})/) {
+	if ($line =~ m/([0-9a-fA-F]{7,40})/) {
 		my $hash_text = $1;
 		my $link =
 			$cgi->a({-href => href(action=>"object", hash=>$hash_text),
-- 
1.6.0.2.514.g23abd3

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2009-01-14  0:35 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-13  0:04 [PATCH] gitweb: recognize six digit abbreviated SHA1 Anders Melchiorsen
2009-01-13  0:08 ` Anders Melchiorsen
2009-01-13  2:00   ` Sam Vilain
2009-01-13  8:26     ` Junio C Hamano
2009-01-14  0:33       ` Sam Vilain

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).