Thread (6 messages) flat view 6 messages, 3 authors, 2016-06-15

Re: [RFC][PATCH] gitweb: Make the Git logo link target to point to the homepage

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:42:41
Subsystem: the rest · Maintainer: Linus Torvalds

Petr Baudis [off-list ref] writes:
Dear diary, on Tue, Sep 19, 2006 at 11:27:25PM CEST, I got a letter
where Petr Baudis [off-list ref] said that...
quoted
It provides more useful information for causual Git users than the Git docs
(especially about where to get Git and such).

Signed-off-by: Petr Baudis <redacted>
Ping?  This is the only gitweb patch still in my stg stack. I guess
noone really cares strongly either way since there were no comments.
I did not care either way, but I did not like either of these
hardcoded strings in the code, and felt that if we are touching
that part of the code we also should be making real improvement
at the same time ;-).  

Doing something like this would let us update it easier, and 
let people override with GITWEB_CONFIG if they want to.

---
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 3d06181..ce90178 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -51,6 +51,9 @@ our $logo = "++GITWEB_LOGO++";
 # URI of GIT favicon, assumed to be image/png type
 our $favicon = "++GITWEB_FAVICON++";
 
+our $githelp_url = "http://git.or.cz/";
+our $githelp_label = "git homepage";
+
 # source of projects list
 our $projects_list = "++GITWEB_LIST++";
 
@@ -1335,7 +1338,9 @@ EOF
 	print "</head>\n" .
 	      "<body>\n" .
 	      "<div class=\"page_header\">\n" .
-	      "<a href=\"http://www.kernel.org/pub/software/scm/git/docs/\" title=\"git documentation\">" .
+	      "<a href=\"" . esc_html($githelp_url) .
+	      "\" title=\"" . esc_html($githelp_label) .
+	      "\">" .
 	      "<img src=\"$logo\" width=\"72\" height=\"27\" alt=\"git\" style=\"float:right; border-width:0px;\"/>" .
 	      "</a>\n";
 	print $cgi->a({-href => esc_param($home_link)}, $home_link_str) . " / ";
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help