]> source.dussan.org Git - jgit.git/commitdiff
Default receive.fsckObjects to transfer.fsckObjects 88/23288/2
authorShawn Pearce <spearce@spearce.org>
Wed, 12 Mar 2014 23:44:59 +0000 (16:44 -0700)
committerShawn Pearce <spearce@spearce.org>
Thu, 13 Mar 2014 00:15:35 +0000 (17:15 -0700)
ReceivePack should configure itself with receive.fsckObjects,
and if not defined, transfer.fsckObjects. This is the order
used by git-core.

Change-Id: I41f243633dacb606dbcc3132972f63bbaba174d1

org.eclipse.jgit/src/org/eclipse/jgit/transport/BaseReceivePack.java

index 483ac55fa90a2c7436b9cbbba1994a58f888c3c9..0c83ece29c2eb6b690ecb8296a52f54df923b116 100644 (file)
@@ -284,8 +284,9 @@ public abstract class BaseReceivePack {
                final boolean allowOfsDelta;
 
                ReceiveConfig(final Config config) {
-                       checkReceivedObjects = config.getBoolean("receive", "fsckobjects", //$NON-NLS-1$ //$NON-NLS-2$
-                                       false);
+                       checkReceivedObjects = config.getBoolean(
+                                       "receive", "fsckobjects", //$NON-NLS-1$ //$NON-NLS-2$
+                                       config.getBoolean("transfer", "fsckobjects", false)); //$NON-NLS-1$ //$NON-NLS-2$
                        allowCreates = true;
                        allowDeletes = !config.getBoolean("receive", "denydeletes", false); //$NON-NLS-1$ //$NON-NLS-2$
                        allowNonFastForwards = !config.getBoolean("receive", //$NON-NLS-1$