summaryrefslogtreecommitdiffstats
path: root/src/com/gitblit/wicket/pages/RepositoryPage.java
diff options
context:
space:
mode:
authorJames Moger <james.moger@gitblit.com>2011-07-22 17:47:53 -0400
committerJames Moger <james.moger@gitblit.com>2011-07-22 17:47:53 -0400
commita2709dd91e5d6b18f573016882ccc70799573ad3 (patch)
tree6b87a08d65c462d9f51b253e7deafb95c7167bbb /src/com/gitblit/wicket/pages/RepositoryPage.java
parentb1dba764c201f4708b82767b2d91edb6e189ce6f (diff)
downloadgitblit-a2709dd91e5d6b18f573016882ccc70799573ad3.tar.gz
gitblit-a2709dd91e5d6b18f573016882ccc70799573ad3.zip
Centralize default branch/HEAD resolution (issue 14)
If an object id was not specified Gitblit used HEAD to perform the operation. This breaks under some conditions like working with a repository that does not have any commits on master but does have commits on a vcs-import branch. The new approach is to centralize the resolution of unspecified object ids to a common method which resolves HEAD first but uses the most recently modified branch if HEAD points to nothing. This commit also includes a non-functional method for creating an empty branch. I couldn't figure out how to make JGit create an orphaned branch.
Diffstat (limited to 'src/com/gitblit/wicket/pages/RepositoryPage.java')
-rw-r--r--src/com/gitblit/wicket/pages/RepositoryPage.java4
1 files changed, 0 insertions, 4 deletions
diff --git a/src/com/gitblit/wicket/pages/RepositoryPage.java b/src/com/gitblit/wicket/pages/RepositoryPage.java
index 22d3323a..7062e3b3 100644
--- a/src/com/gitblit/wicket/pages/RepositoryPage.java
+++ b/src/com/gitblit/wicket/pages/RepositoryPage.java
@@ -330,10 +330,6 @@ public abstract class RepositoryPage extends BasePage {
return WicketUtils.newObjectParameter(repositoryName, commitId);
}
- protected PageParameters newPathParameter(String path) {
- return WicketUtils.newPathParameter(repositoryName, objectId, path);
- }
-
private static class PageRegistration implements Serializable {
private static final long serialVersionUID = 1L;