From 6cbe89ac2b96023bda74c97a61e7e0011db2bb08 Mon Sep 17 00:00:00 2001 From: James Moger Date: Tue, 20 Mar 2012 19:40:08 -0400 Subject: [PATCH] Disable default branch/HEAD selector on create/empty repository --- src/com/gitblit/wicket/pages/EditRepositoryPage.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/com/gitblit/wicket/pages/EditRepositoryPage.java b/src/com/gitblit/wicket/pages/EditRepositoryPage.java index bd84ae3c..5b2124ac 100644 --- a/src/com/gitblit/wicket/pages/EditRepositoryPage.java +++ b/src/com/gitblit/wicket/pages/EditRepositoryPage.java @@ -302,7 +302,7 @@ public class EditRepositoryPage extends RootSubPage { if (!ArrayUtils.isEmpty(repositoryModel.availableRefs)) { availableRefs.addAll(repositoryModel.availableRefs); } - form.add(new DropDownChoice("HEAD", availableRefs).setEnabled(!isCreate)); + form.add(new DropDownChoice("HEAD", availableRefs).setEnabled(availableRefs.size() > 0)); // federation strategies - remove ORIGIN choice if this repository has // no origin. -- 2.39.5