Source:
<code>private void runPushOperation() { if (!pool.requestRunway(this)) { if (!canceled) { log.info("Rescheduling replication to " + uri + " to avoid collision with an in-flight push."); pool.reschedule(this, Destination.RetryReason.COLLISION); } return; } try { git = gitManager.openRepository(projectName); runImpl(); } catch (RepositoryNotFoundException e) { wrappedLog.error("Cannot replicate " + projectName + "; Local repository error: " + e.getMessage(), getStatesAsArray()); } catch (RemoteRepositoryException e) { final String msg = e.getMessage(); if (msg.contains("access denied")) { createRepository(); } else { log.error("Cannot replicate " + projectName + "; Remote repository error: " + msg); } } catch (NoRemoteRepositoryException e) { createRepository(); } catch (NotSupportedException e) { wrappedLog.error("Cannot replicate to " + uri, e, getStatesAsArray()); } catch (TransportException e) { Throwable cause = e.getCause(); if (cause instanceof JSchException && cause.getMessage().startsWith("UnknownHostKey:")) { log.error("Cannot replicate to " + uri + ": " + cause.getMessage()); } else if (e instanceof LockFailureException) { lockRetry++; log.error("Cannot replicate to " + e.getMessage()); } else { log.error("Cannot replicate to " + uri, e); } if (lockRetry <= pool.getLockErrorMaxRetries()) { pool.reschedule(this, Destination.RetryReason.TRANSPORT_ERROR); } else { <START> log.error("Giving up after " + pool.getLockErrorMaxRetries() + " attempts to replicate, but <END> still failing due to: " + e.getMessage()); } } catch (IOException e) { wrappedLog.error("Cannot replicate to " + uri, e, getStatesAsArray()); } catch (RuntimeException e) { wrappedLog.error("Unexpected error during replication to " + uri, e, getStatesAsArray()); } catch (Error e) { wrappedLog.error("Unexpected error during replication to " + uri, e, getStatesAsArray()); } finally { if (git != null) { git.close(); } pool.notifyFinished(this); } }</code><technical_language>If retry is configured, set 0, this results in log: Giving 0 attempts replicate</technical_language>

Target:
private void runPushOperation() { if (!pool.requestRunway(this)) { if (!canceled) { log.info("Rescheduling replication to " + uri + " to avoid collision with an in-flight push."); pool.reschedule(this, Destination.RetryReason.COLLISION); } return; } try { git = gitManager.openRepository(projectName); runImpl(); } catch (RepositoryNotFoundException e) { wrappedLog.error("Cannot replicate " + projectName + "; Local repository error: " + e.getMessage(), getStatesAsArray()); } catch (RemoteRepositoryException e) { final String msg = e.getMessage(); if (msg.contains("access denied")) { createRepository(); } else { log.error("Cannot replicate " + projectName + "; Remote repository error: " + msg); } } catch (NoRemoteRepositoryException e) { createRepository(); } catch (NotSupportedException e) { wrappedLog.error("Cannot replicate to " + uri, e, getStatesAsArray()); } catch (TransportException e) { Throwable cause = e.getCause(); if (cause instanceof JSchException && cause.getMessage().startsWith("UnknownHostKey:")) { log.error("Cannot replicate to " + uri + ": " + cause.getMessage()); } else if (e instanceof LockFailureException) { lockRetryCount++; log.error("Cannot replicate to " + e.getMessage()); } else { log.error("Cannot replicate to " + uri, e); } if (lockRetryCount <= maxLockRetries) { pool.reschedule(this, Destination.RetryReason.TRANSPORT_ERROR); } else { log.error("Giving up after " + lockRetryCount + " attempts to replicate. Failing due to: " + e.getMessage()); } } catch (IOException e) { wrappedLog.error("Cannot replicate to " + uri, e, getStatesAsArray()); } catch (RuntimeException e) { wrappedLog.error("Unexpected error during replication to " + uri, e, getStatesAsArray()); } catch (Error e) { wrappedLog.error("Unexpected error during replication to " + uri, e, getStatesAsArray()); } finally { if (git != null) { git.close(); } pool.notifyFinished(this); } }