]> source.dussan.org Git - gitblit.git/commitdiff
Disable default branch/HEAD selector on create/empty repository
authorJames Moger <james.moger@gitblit.com>
Tue, 20 Mar 2012 23:40:08 +0000 (19:40 -0400)
committerJames Moger <james.moger@gitblit.com>
Tue, 20 Mar 2012 23:40:08 +0000 (19:40 -0400)
src/com/gitblit/wicket/pages/EditRepositoryPage.java

index bd84ae3c586f99d2c0b9755d82dfba09c154a4b9..5b2124ac2519aae099d4af9d93806b111e455e54 100644 (file)
@@ -302,7 +302,7 @@ public class EditRepositoryPage extends RootSubPage {
                if (!ArrayUtils.isEmpty(repositoryModel.availableRefs)) {\r
                        availableRefs.addAll(repositoryModel.availableRefs);\r
                }\r
-               form.add(new DropDownChoice<String>("HEAD", availableRefs).setEnabled(!isCreate));\r
+               form.add(new DropDownChoice<String>("HEAD", availableRefs).setEnabled(availableRefs.size() > 0));\r
 \r
                // federation strategies - remove ORIGIN choice if this repository has\r
                // no origin.\r