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
This commit is contained in:
Shawn Pearce 2014-03-12 16:53:26 -07:00
parent a1a5218032
commit ced58a7cff
1 changed files with 6 additions and 3 deletions

View File

@ -63,7 +63,7 @@ public TransferConfig parse(final Config cfg) {
} }
}; };
private final boolean fsckObjects; private final boolean fetchFsck;
private final boolean allowTipSha1InWant; private final boolean allowTipSha1InWant;
private final String[] hideRefs; private final String[] hideRefs;
@ -72,7 +72,10 @@ public TransferConfig parse(final Config cfg) {
} }
private TransferConfig(final Config rc) { 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( allowTipSha1InWant = rc.getBoolean(
"uploadpack", "allowtipsha1inwant", false); //$NON-NLS-1$ //$NON-NLS-2$ "uploadpack", "allowtipsha1inwant", false); //$NON-NLS-1$ //$NON-NLS-2$
hideRefs = rc.getStringList("uploadpack", null, "hiderefs"); //$NON-NLS-1$ //$NON-NLS-2$ hideRefs = rc.getStringList("uploadpack", null, "hiderefs"); //$NON-NLS-1$ //$NON-NLS-2$
@ -82,7 +85,7 @@ private TransferConfig(final Config rc) {
* @return strictly verify received objects? * @return strictly verify received objects?
*/ */
public boolean isFsckObjects() { public boolean isFsckObjects() {
return fsckObjects; return fetchFsck;
} }
/** /**