summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--releases.moxie1
-rw-r--r--src/main/java/com/gitblit/wicket/pages/EditRepositoryPage.java4
2 files changed, 5 insertions, 0 deletions
diff --git a/releases.moxie b/releases.moxie
index a5339778..4fa313a7 100644
--- a/releases.moxie
+++ b/releases.moxie
@@ -21,6 +21,7 @@ r20: {
- Fixed NPE when attempting to add a permission without a registrant (issue-344)
- Invalidate all cached repository data on "clear cache" (issue-346)
- Fix chart failures when an apostrophe is in a user display name (issue-350, pr-128)
+ - Fix exception in create repository when not selecting a garbage collection period (issue-366)
- Stop setting admin permission based on undocumented Redmine REST API behavior (issue-368)
- Fix support url decoding with non-ascii characters (pr-136)
- Fix potential NPE on removing uncached repository from cache
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));