summaryrefslogtreecommitdiffstats
path: root/src/main/java/com/gitblit/wicket/pages/EditRepositoryPage.java
diff options
context:
space:
mode:
authorJames Moger <james.moger@gitblit.com>2014-02-21 09:49:44 -0500
committerJames Moger <james.moger@gitblit.com>2014-02-21 09:56:37 -0500
commitb23b67c1cc0b2541580f23c9aec97c0b84a823f4 (patch)
tree89bbf1eab4146d072f7b01ea14419b8e6cd25aa9 /src/main/java/com/gitblit/wicket/pages/EditRepositoryPage.java
parent6d29e03364472f8881c120a290546a516f0a8b56 (diff)
downloadgitblit-b23b67c1cc0b2541580f23c9aec97c0b84a823f4.tar.gz
gitblit-b23b67c1cc0b2541580f23c9aec97c0b84a823f4.zip
Select default/configured gc period in create/edit repository page
Diffstat (limited to 'src/main/java/com/gitblit/wicket/pages/EditRepositoryPage.java')
-rw-r--r--src/main/java/com/gitblit/wicket/pages/EditRepositoryPage.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/main/java/com/gitblit/wicket/pages/EditRepositoryPage.java b/src/main/java/com/gitblit/wicket/pages/EditRepositoryPage.java
index bb166101..c4f480bb 100644
--- a/src/main/java/com/gitblit/wicket/pages/EditRepositoryPage.java
+++ b/src/main/java/com/gitblit/wicket/pages/EditRepositoryPage.java
@@ -449,6 +449,10 @@ public class EditRepositoryPage extends RootSubPage {
form.add(new DropDownChoice<String>("HEAD", availableRefs).setEnabled(availableRefs.size() > 0));
boolean gcEnabled = app().settings().getBoolean(Keys.git.enableGarbageCollection, false);
+ int defaultGcPeriod = app().settings().getInteger(Keys.git.defaultGarbageCollectionPeriod, 7);
+ if (repositoryModel.gcPeriod == 0) {
+ repositoryModel.gcPeriod = defaultGcPeriod;
+ }
List<Integer> gcPeriods = Arrays.asList(1, 2, 3, 4, 5, 7, 10, 14 );
form.add(new DropDownChoice<Integer>("gcPeriod", gcPeriods, new GCPeriodRenderer()).setEnabled(gcEnabled));
form.add(new TextField<String>("gcThreshold").setEnabled(gcEnabled));