It is a common practice to put links to bugzillas, mailing lists, etc.
in git log entries. The fact that gitweb doesn't make HTML links out of
that URLs makes following those URLs inconvenient. This patch fixes that
problem, trying to address cases when URL is enclosed in round or square
brackets.
Slightly tested on http://git.openvz.org/. Applicable to git-1.4.4.
Signed-off-by: Kir Kolyshkin <kir@xxxxxxxxxx>
---
gitweb/gitweb.perl | 2 ++
1 file changed, 2 insertions(+)
--- git-1.4.4/gitweb/gitweb.perl 2006-11-15 08:22:27.000000000 +0100
+++ git-1.4.4-my/gitweb/gitweb.perl 2006-11-21 22:49:14.000000000 +0100
@@ -828,6 +828,8 @@
$line =~ s/$hash_text/$link/;
}
}
+ # make HTML links out of http(s) URLs
+ $line =~ s/(http[s]?:\/\/[^[:space:]\]\)]+)/<a href="\1">\1<\/a>/g;
return $line;
}
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html