Merge "RepoCommand: Do not wrap GitApiExceptions in GitApiExceptions"
This commit is contained in:
commit
32b1a1b3a3
|
@ -578,10 +578,10 @@ public RevCommit call() throws GitAPIException {
|
||||||
|
|
||||||
DirCache index = DirCache.newInCore();
|
DirCache index = DirCache.newInCore();
|
||||||
ObjectInserter inserter = repo.newObjectInserter();
|
ObjectInserter inserter = repo.newObjectInserter();
|
||||||
|
|
||||||
try (RevWalk rw = new RevWalk(repo)) {
|
try (RevWalk rw = new RevWalk(repo)) {
|
||||||
prepareIndex(renamedProjects, index, inserter);
|
prepareIndex(renamedProjects, index, inserter);
|
||||||
ObjectId treeId = index.writeTree(inserter);
|
ObjectId treeId = index.writeTree(inserter);
|
||||||
|
|
||||||
long prevDelay = 0;
|
long prevDelay = 0;
|
||||||
for (int i = 0; i < LOCK_FAILURE_MAX_RETRIES - 1; i++) {
|
for (int i = 0; i < LOCK_FAILURE_MAX_RETRIES - 1; i++) {
|
||||||
try {
|
try {
|
||||||
|
@ -597,7 +597,7 @@ public RevCommit call() throws GitAPIException {
|
||||||
}
|
}
|
||||||
// In the last try, just propagate the exceptions
|
// In the last try, just propagate the exceptions
|
||||||
return commitTreeOnCurrentTip(inserter, rw, treeId);
|
return commitTreeOnCurrentTip(inserter, rw, treeId);
|
||||||
} catch (GitAPIException | IOException | InterruptedException e) {
|
} catch (IOException | InterruptedException e) {
|
||||||
throw new ManifestErrorException(e);
|
throw new ManifestErrorException(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -609,12 +609,11 @@ public RevCommit call() throws GitAPIException {
|
||||||
}
|
}
|
||||||
return git.commit().setMessage(RepoText.get().repoCommitMessage)
|
return git.commit().setMessage(RepoText.get().repoCommitMessage)
|
||||||
.call();
|
.call();
|
||||||
} catch (GitAPIException | IOException e) {
|
} catch (IOException e) {
|
||||||
throw new ManifestErrorException(e);
|
throw new ManifestErrorException(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private void prepareIndex(List<RepoProject> projects, DirCache index,
|
private void prepareIndex(List<RepoProject> projects, DirCache index,
|
||||||
ObjectInserter inserter) throws IOException, GitAPIException {
|
ObjectInserter inserter) throws IOException, GitAPIException {
|
||||||
Config cfg = new Config();
|
Config cfg = new Config();
|
||||||
|
|
Loading…
Reference in New Issue