git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [ANNOUNCE] git/gitweb.git repository

From
David Symonds <dsymonds@gmail.com>
Date
Aug 31, 2007, 01:00 UTC
Message-ID
<ee77f5c20708301800s7fbaec17sa9a58b40826ff8a2@mail.gmail.com>
In-Reply-To
<ee77f5c20708301756k60b4d295j907da463af477982@mail.gmail.com>
On 31/08/2007, David Symonds <dsymonds@gmail.com> wrote:
Show 10 quoted lines
> On 31/08/2007, Petr Baudis <pasky@suse.cz> wrote:
> >   Please feel encouraged to make random forks for your development
> > efforts, or push your random patches (preferrably just bugfixes,
> > something possibly controversial should be kept in safe containment like
> > a fork or separate branch) to the mob branch.
>
> Sorry, I'm still relatively new to git, and couldn't work out how to
> push to the mob branch, so it's inline below. It's fairly minor, just
> adding <span title="foo">..</span> around author names when they get
> abbreviated.
Darn, looks like I suck at copy-n-paste, too. Here's an unwrapped patch:
>From 37c85462393d3e83d83dbdc9362cd9ff7587574c Mon Sep 17 00:00:00 2001
From: David Symonds <dsymonds@gmail.com>
Date: Fri, 31 Aug 2007 10:49:53 +1000
Subject: [PATCH] gitweb: Provide title attributes for abbreviated author names.
Signed-off-by: David Symonds <dsymonds@gmail.com>
---
 gitweb/gitweb.perl |   34 +++++++++++++++++++++++++++++-----
 1 files changed, 29 insertions(+), 5 deletions(-)
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index b2bae1b..3112fd4 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -3461,9 +3461,15 @@ sub git_shortlog_body {
 			print "<tr class=\"light\">\n";
 		}
 		$alternate ^= 1;
+		my $author = chop_str($co{'author_name'}, 10);
+		if ($author ne $co{'author_name'}) {
+			$author = "<span title=\"$co{'author_name'}\">" .
esc_html($author) . "</span>";
+		} else {
+			$author = esc_html($author);
+		}
 		# git_summary() used print "<td><i>$co{'age_string'}</i></td>\n" .
 		print "<td title=\"$co{'age_string_age'}\"><i>$co{'age_string_date'}</i></td>\n"
.
-		      "<td><i>" . esc_html(chop_str($co{'author_name'}, 10)) .
"</i></td>\n" .
+		      "<td><i>" . $author . "</i></td>\n" .
 		      "<td>";
 		print format_subject_html($co{'title'}, $co{'title_short'},
 		                          href(action=>"commit", hash=>$commit), $ref);
@@ -3511,9 +3517,15 @@ sub git_history_body {
 			print "<tr class=\"light\">\n";
 		}
 		$alternate ^= 1;
+	# shortlog uses      chop_str($co{'author_name'}, 10)
+		my $author = chop_str($co{'author_name'}, 15, 3);
+		if ($author ne $co{'author_name'}) {
+			"<span title=\"$co{'author_name'}\">" . esc_html($author) . "</span>";
+		} else {
+			$author = esc_html($author);
+		}
 		print "<td title=\"$co{'age_string_age'}\"><i>$co{'age_string_date'}</i></td>\n"
.
-		      # shortlog uses      chop_str($co{'author_name'}, 10)
-		      "<td><i>" . esc_html(chop_str($co{'author_name'}, 15, 3)) .
"</i></td>\n" .
+		      "<td><i>" . $author . "</i></td>\n" .
 		      "<td>";
 		# originally git_history used chop_str($co{'title'}, 50)
 		print format_subject_html($co{'title'}, $co{'title_short'},
@@ -3667,8 +3679,14 @@ sub git_search_grep_body {
 			print "<tr class=\"light\">\n";
 		}
 		$alternate ^= 1;
+		my $author = chop_str($co{'author_name'}, 15, 5);
+		if ($author ne $co{'author_name'}) {
+			$author = "<span title=\"$co{'author_name'}\">" .
esc_html($author) . "</span>";
+		} else {
+			$author = esc_html($author);
+		}
 		print "<td title=\"$co{'age_string_age'}\"><i>$co{'age_string_date'}</i></td>\n"
.
-		      "<td><i>" . esc_html(chop_str($co{'author_name'}, 15, 5)) .
"</i></td>\n" .
+		      "<td><i>" . $author . "</i></td>\n" .
 		      "<td>" .
 		      $cgi->a({-href => href(action=>"commit", hash=>$co{'id'}),
-class => "list subject"},
 			       esc_html(chop_str($co{'title'}, 50)) . "<br/>");
@@ -5181,8 +5199,14 @@ sub git_search {
 						print "<tr class=\"light\">\n";
 					}
 					$alternate ^= 1;
+					my $author = chop_str($co{'author_name'}, 15, 5);
+					if ($author ne $co{'author_name'}) {
+						$author = "<span title=\"$co{'author_name'}\">" .
esc_html($author) . "</span>";
+					} else {
+						$author = esc_html($author);
+					}
 					print "<td
title=\"$co{'age_string_age'}\"><i>$co{'age_string_date'}</i></td>\n"
.
-					      "<td><i>" . esc_html(chop_str($co{'author_name'}, 15, 5))
. "</i></td>\n" .
+					      "<td><i>" . $author . "</i></td>\n" .
 					      "<td>" .
 					      $cgi->a({-href => href(action=>"commit", hash=>$co{'id'}),
 					              -class => "list subject"},
-- 
1.5.2.4
Previous: David SymondsNext: David Symonds
Message 3 of 24 in “[ANNOUNCE] git/gitweb.git repository”
  1. Petr BaudisAug 31, 2007
  2. David SymondsAug 31, 2007
  3. David SymondsAug 31, 2007
  4. David SymondsSep 1, 2007
  5. David SymondsSep 7, 2007
  6. Luben TuikovSep 1, 2007
  7. Petr BaudisSep 1, 2007
  8. Luben TuikovSep 1, 2007
  9. Johannes SchindelinSep 1, 2007
  10. Petr BaudisSep 1, 2007
  11. Junio C HamanoSep 1, 2007
  12. Luben TuikovSep 1, 2007
  13. Junio C HamanoSep 1, 2007
  14. Luben TuikovSep 1, 2007
  15. Jon SmirlSep 1, 2007
  16. Junio C HamanoSep 1, 2007
  17. Jakub NarebskiSep 1, 2007
  18. Junio C HamanoSep 4, 2007
  19. Adam RobenSep 4, 2007
  20. Shawn O. PearceSep 4, 2007
  21. Junio C HamanoSep 4, 2007
  22. Andreas EricssonSep 4, 2007
  23. Petr BaudisSep 4, 2007
  24. Luben TuikovSep 4, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.