From 30f9d25d77ccb5cd978d4cf8fa389ec819e90e95 Mon Sep 17 00:00:00 2001 From: Philip L. McMahon <philip.l.mcmahon@gmail.com> Date: Fri, 27 Jan 2012 02:02:19 -0500 Subject: [PATCH] Correct update of HEAD symbolic reference when target is a tag. --- src/com/gitblit/wicket/pages/TreePage.java | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/com/gitblit/wicket/pages/TreePage.java b/src/com/gitblit/wicket/pages/TreePage.java index 8695621..7fc91ee 100644 --- a/src/com/gitblit/wicket/pages/TreePage.java +++ b/src/com/gitblit/wicket/pages/TreePage.java @@ -78,6 +78,8 @@ final ByteFormat byteFormat = new ByteFormat(); + final String baseUrl = WicketUtils.getGitblitURL(getRequest()); + // changed paths list ListDataProvider<PathModel> pathsDp = new ListDataProvider<PathModel>(paths); DataView<PathModel> pathsView = new DataView<PathModel>("changedPath", pathsDp) { @@ -112,10 +114,9 @@ links.add(new BookmarkablePageLink<Void>("history", HistoryPage.class, WicketUtils.newPathParameter(repositoryName, entry.commitId, entry.path))); - links.add(new ExternalLink("zip", DownloadZipServlet.asLink(getRequest() - .getRelativePathPrefixToContextRoot(), repositoryName, objectId, - entry.path)).setVisible(GitBlit.getBoolean( - Keys.web.allowZipDownloads, true))); + links.add(new ExternalLink("zip", DownloadZipServlet.asLink(baseUrl, + repositoryName, objectId, entry.path)).setVisible(GitBlit + .getBoolean(Keys.web.allowZipDownloads, true))); item.add(links); } else { // blob link -- Gitblit v1.9.1