From 16856603ec575718857768e2d18e455c95fd6ea4 Mon Sep 17 00:00:00 2001 From: James Moger <james.moger@gitblit.com> Date: Tue, 07 Jun 2011 19:08:24 -0400 Subject: [PATCH] Documentation. Moved clone and fetch into JGitUtils. Create bare only. --- src/com/gitblit/wicket/pages/TreePage.java | 10 +++++++++- 1 files changed, 9 insertions(+), 1 deletions(-) diff --git a/src/com/gitblit/wicket/pages/TreePage.java b/src/com/gitblit/wicket/pages/TreePage.java index 4fc7119..f796266 100644 --- a/src/com/gitblit/wicket/pages/TreePage.java +++ b/src/com/gitblit/wicket/pages/TreePage.java @@ -26,6 +26,7 @@ import org.apache.wicket.markup.repeater.data.DataView; import org.apache.wicket.markup.repeater.data.ListDataProvider; import org.eclipse.jgit.lib.Constants; +import org.eclipse.jgit.lib.FileMode; import org.eclipse.jgit.lib.Repository; import org.eclipse.jgit.revwalk.RevCommit; @@ -65,7 +66,14 @@ // breadcrumbs add(new PathBreadcrumbsPanel("breadcrumbs", repositoryName, path, objectId)); if (path != null && path.trim().length() > 0) { - paths.add(0, PathModel.getParentPath(path, objectId)); + // add .. parent path entry + String parentPath = null; + if (path.lastIndexOf('/') > -1) { + parentPath = path.substring(0, path.lastIndexOf('/')); + } + PathModel model = new PathModel("..", parentPath, 0, FileMode.TREE.getBits(), objectId); + model.isParentPath = true; + paths.add(0, model); } final ByteFormat byteFormat = new ByteFormat(); -- Gitblit v1.9.1