Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[fix JENKINS-20531], catch GitException during fetch, throw AbortExce…
…ption

The AbortException is already thrown from another area of the same
method, so throwing the AbortException is likely no worse than the
existing AbortException which is thrown (instead of GitException).
  • Loading branch information
daspilker authored and MarkEWaite committed Oct 29, 2014
1 parent d4dda4b commit b6174a1
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/main/java/hudson/plugins/git/GitSCM.java
Expand Up @@ -893,7 +893,12 @@ private void retrieveChanges(AbstractBuild build, GitClient git, BuildListener l
}

for (RemoteConfig remoteRepository : repos) {
fetchFrom(git, listener, remoteRepository);
try {
fetchFrom(git, listener, remoteRepository);
} catch (GitException ex) {
ex.printStackTrace(listener.error("Error fetching changes from repo '%s'", remoteRepository.getName()));
throw new AbortException();
}
}
}

Expand Down

0 comments on commit b6174a1

Please sign in to comment.