|
|
@ -196,8 +196,7 @@ class FetchProcess { |
|
|
|
.newBatchUpdate() |
|
|
|
.newBatchUpdate() |
|
|
|
.setAllowNonFastForwards(true) |
|
|
|
.setAllowNonFastForwards(true) |
|
|
|
.setRefLogMessage("fetch", true); //$NON-NLS-1$
|
|
|
|
.setRefLogMessage("fetch", true); //$NON-NLS-1$
|
|
|
|
final RevWalk walk = new RevWalk(transport.local); |
|
|
|
try (final RevWalk walk = new RevWalk(transport.local)) { |
|
|
|
try { |
|
|
|
|
|
|
|
if (monitor instanceof BatchingProgressMonitor) { |
|
|
|
if (monitor instanceof BatchingProgressMonitor) { |
|
|
|
((BatchingProgressMonitor) monitor).setDelayStart( |
|
|
|
((BatchingProgressMonitor) monitor).setDelayStart( |
|
|
|
250, TimeUnit.MILLISECONDS); |
|
|
|
250, TimeUnit.MILLISECONDS); |
|
|
@ -226,8 +225,6 @@ class FetchProcess { |
|
|
|
throw new TransportException(MessageFormat.format( |
|
|
|
throw new TransportException(MessageFormat.format( |
|
|
|
JGitText.get().failureUpdatingTrackingRef, |
|
|
|
JGitText.get().failureUpdatingTrackingRef, |
|
|
|
getFirstFailedRefName(batch), err.getMessage()), err); |
|
|
|
getFirstFailedRefName(batch), err.getMessage()), err); |
|
|
|
} finally { |
|
|
|
|
|
|
|
walk.release(); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (!fetchHeadUpdates.isEmpty()) { |
|
|
|
if (!fetchHeadUpdates.isEmpty()) { |
|
|
@ -338,15 +335,12 @@ class FetchProcess { |
|
|
|
|
|
|
|
|
|
|
|
private boolean askForIsComplete() throws TransportException { |
|
|
|
private boolean askForIsComplete() throws TransportException { |
|
|
|
try { |
|
|
|
try { |
|
|
|
final ObjectWalk ow = new ObjectWalk(transport.local); |
|
|
|
try (final ObjectWalk ow = new ObjectWalk(transport.local)) { |
|
|
|
try { |
|
|
|
|
|
|
|
for (final ObjectId want : askFor.keySet()) |
|
|
|
for (final ObjectId want : askFor.keySet()) |
|
|
|
ow.markStart(ow.parseAny(want)); |
|
|
|
ow.markStart(ow.parseAny(want)); |
|
|
|
for (final Ref ref : localRefs().values()) |
|
|
|
for (final Ref ref : localRefs().values()) |
|
|
|
ow.markUninteresting(ow.parseAny(ref.getObjectId())); |
|
|
|
ow.markUninteresting(ow.parseAny(ref.getObjectId())); |
|
|
|
ow.checkConnectivity(); |
|
|
|
ow.checkConnectivity(); |
|
|
|
} finally { |
|
|
|
|
|
|
|
ow.release(); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
return true; |
|
|
|
return true; |
|
|
|
} catch (MissingObjectException e) { |
|
|
|
} catch (MissingObjectException e) { |
|
|
|