summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShawn Pearce <spearce@spearce.org>2014-03-12 16:53:26 -0700
committerShawn Pearce <spearce@spearce.org>2014-03-12 17:15:41 -0700
commitced58a7cff03654024bd9f154cfea2bd9459d39c (patch)
treeeb143ebcaf789ea475b61f2ffcc8604d1a45677c
parenta1a5218032a8f068fd0ee62d56acdb6251404583 (diff)
downloadjgit-ced58a7cff03654024bd9f154cfea2bd9459d39c.tar.gz
jgit-ced58a7cff03654024bd9f154cfea2bd9459d39c.zip
Correct fetch to use fetch.fsckObjects and transfer.fsckObjects
git-core configures fsck during fetch using these two variables. JGit use of fsck in fetch predates the usage in git-core and had reused receive.fsckobjects, which does not match behavior. Change-Id: Ie4d5f082258c4b2928c7ecc3780c6363fa587f34
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/TransferConfig.java9
1 files changed, 6 insertions, 3 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransferConfig.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransferConfig.java
index 3a08cd35df..b00d607eee 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransferConfig.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransferConfig.java
@@ -63,7 +63,7 @@ public class TransferConfig {
}
};
- private final boolean fsckObjects;
+ private final boolean fetchFsck;
private final boolean allowTipSha1InWant;
private final String[] hideRefs;
@@ -72,7 +72,10 @@ public class TransferConfig {
}
private TransferConfig(final Config rc) {
- fsckObjects = rc.getBoolean("receive", "fsckobjects", false); //$NON-NLS-1$ //$NON-NLS-2$
+ fetchFsck = rc.getBoolean(
+ "fetch", "fsckobjects", //$NON-NLS-1$ //$NON-NLS-2$
+ rc.getBoolean("transfer", "fsckobjects", false)); //$NON-NLS-1$ //$NON-NLS-2$
+
allowTipSha1InWant = rc.getBoolean(
"uploadpack", "allowtipsha1inwant", false); //$NON-NLS-1$ //$NON-NLS-2$
hideRefs = rc.getStringList("uploadpack", null, "hiderefs"); //$NON-NLS-1$ //$NON-NLS-2$
@@ -82,7 +85,7 @@ public class TransferConfig {
* @return strictly verify received objects?
*/
public boolean isFsckObjects() {
- return fsckObjects;
+ return fetchFsck;
}
/**