summaryrefslogtreecommitdiff
path: root/t/t7610-mergetool.sh
diff options
context:
space:
mode:
authorLibravatar Kevin Cernekee <cernekee@gmail.com>2011-03-18 17:00:16 +0100
committerLibravatar Junio C Hamano <gitster@pobox.com>2011-03-18 12:29:31 -0700
commit5e96a847b391eda693b60347bb190dd45fb1721c (patch)
tree532520caf38b33eb5b7cb6b6c3e3439163dc0ea1 /t/t7610-mergetool.sh
parentName make_*_path functions more accurately (diff)
downloadtgif-5e96a847b391eda693b60347bb190dd45fb1721c.tar.xz
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 <cernekee@gmail.com> Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t7610-mergetool.sh')
0 files changed, 0 insertions, 0 deletions