summaryrefslogtreecommitdiffstats
path: root/src/main/java/com
diff options
context:
space:
mode:
authorJames Moger <james.moger@gitblit.com>2014-04-17 10:03:01 -0600
committerJames Moger <james.moger@gitblit.com>2014-04-17 10:03:01 -0600
commit067bb4db93544dca984363dbe728f94607ba8a5d (patch)
tree49f4fbd862a207be2c4ade49a61844c46ed6af77 /src/main/java/com
parent1669542eb84bb2d7692b04c1043af69f73933657 (diff)
parent7baf2e4cd2ef8082b74937e26de75b01e630b5d4 (diff)
downloadgitblit-067bb4db93544dca984363dbe728f94607ba8a5d.tar.gz
gitblit-067bb4db93544dca984363dbe728f94607ba8a5d.zip
Merged #48 "Expose JGit 3.x receive pack settings as Gitblit settings"
Diffstat (limited to 'src/main/java/com')
-rw-r--r--src/main/java/com/gitblit/git/GitblitReceivePack.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/main/java/com/gitblit/git/GitblitReceivePack.java b/src/main/java/com/gitblit/git/GitblitReceivePack.java
index 0cc41987..61f2d67d 100644
--- a/src/main/java/com/gitblit/git/GitblitReceivePack.java
+++ b/src/main/java/com/gitblit/git/GitblitReceivePack.java
@@ -119,6 +119,17 @@ public class GitblitReceivePack extends ReceivePack implements PreReceiveHook, P
setAllowDeletes(user.canDeleteRef(repository));
setAllowNonFastForwards(user.canRewindRef(repository));
+ int maxObjectSz = settings.getInteger(Keys.git.maxObjectSizeLimit, -1);
+ if (maxObjectSz >= 0) {
+ setMaxObjectSizeLimit(maxObjectSz);
+ }
+ int maxPackSz = settings.getInteger(Keys.git.maxPackSizeLimit, -1);
+ if (maxPackSz >= 0) {
+ setMaxPackSizeLimit(maxPackSz);
+ }
+ setCheckReceivedObjects(settings.getBoolean(Keys.git.checkReceivedObjects, true));
+ setCheckReferencedObjectsAreReachable(settings.getBoolean(Keys.git.checkReferencedObjectsAreReachable, true));
+
// setup pre and post receive hook
setPreReceiveHook(this);
setPostReceiveHook(this);