From 5ae0b71e1e6e73e4bacf321a7d5be49fcdf4ad97 Mon Sep 17 00:00:00 2001
From: James Moger <james.moger@gitblit.com>
Date: Thu, 20 Oct 2011 08:01:54 -0400
Subject: [PATCH] Properly handle anonymous registrations.

---
 src/com/gitblit/wicket/panels/BranchesPanel.java |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/src/com/gitblit/wicket/panels/BranchesPanel.java b/src/com/gitblit/wicket/panels/BranchesPanel.java
index 24e0e98..d45c0e6 100644
--- a/src/com/gitblit/wicket/panels/BranchesPanel.java
+++ b/src/com/gitblit/wicket/panels/BranchesPanel.java
@@ -142,7 +142,9 @@
 					this, null), BranchesPage.class, WicketUtils.newRepositoryParameter(model.name)));
 		}
 		// We always have 1 branch
-		hasBranches = branches.size() > 1;
+		hasBranches = (branches.size() > 1)
+				|| ((branches.size() == 1) && !branches.get(0).displayName
+						.equalsIgnoreCase("master"));
 	}
 
 	public BranchesPanel hideIfEmpty() {

--
Gitblit v1.9.1