Browse Source

Default receive.fsckObjects to transfer.fsckObjects

ReceivePack should configure itself with receive.fsckObjects,
and if not defined, transfer.fsckObjects. This is the order
used by git-core.

Change-Id: I41f243633dacb606dbcc3132972f63bbaba174d1
stable-3.4
Shawn Pearce 11 years ago
parent
commit
a1a5218032
  1. 5
      org.eclipse.jgit/src/org/eclipse/jgit/transport/BaseReceivePack.java

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

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

Loading…
Cancel
Save