gitweb: fix #patchNN anchors when path_info is enabled
gitweb: fix #patchNN anchors when path_info is enabled

When $feature{'pathinfo'} is used, gitweb script sets the base URL to
itself, so that relative links to static files work correctly.  It
does it by adding something like below to HTML head:

  <base href="http://HOST/gitweb.cgi">

This breaks the "patch" anchor links seen on the commitdiff pages,
because these links, being relative (<a href="#patch1">), are resolved
(computed) relative to the base URL and not relative to current URL,
i.e. as:

  http://HOST/gitweb.cgi#patch1

Instead, they should look like this:

  http://HOST/gitweb.cgi/myproject.git/commitdiff/35a9811ef9d68eae9afd76bede121da4f89b448c#patch1

Add an "-anchor" parameter to href(), and use href(-anchor=>"patch1")
to generate "patch" anchor links, so that the full path is included in
the patch link.

While at it, convert

  print "foo";
  print "bar";

to

  print "foo" .
        "bar";

in the neighborhood of changes.

Signed-off-by: Kevin Cernekee <3105dbb3dd63fbb4f6371cfb04adc6726f76c56b@gmail.com>
Signed-off-by: Jakub Narebski <a6a1517a087f9f64a72f41a0de57ff01fbb0e412@gmail.com>
Signed-off-by: Junio C Hamano <a6723cc3f76163bf7adb636a73ac3b0ceb3e6b9b@pobox.com>

destenson/git,destenson/git,destenson/git,destenson/git,destenson/git,destenson/git,destenson/git,destenson/git