RepoCommand opend two repos without closing them or returning them to the caller. This caused certain tests to fail on Windows. Change-Id: Ia04924aaaad4d16f883b06404c2a85d3f801231f Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>tags/v3.6.0.201412230720-r
@@ -193,6 +193,7 @@ public class RepoCommand extends GitCommand<RevCommit> { | |||
try { | |||
return readFileFromRepo(repo, ref, path); | |||
} finally { | |||
repo.close(); | |||
FileUtils.delete(dir, FileUtils.RECURSIVE); | |||
} | |||
} | |||
@@ -860,6 +861,7 @@ public class RepoCommand extends GitCommand<RevCommit> { | |||
if (revision != null) { | |||
Git sub = new Git(subRepo); | |||
sub.checkout().setName(findRef(revision, subRepo)).call(); | |||
subRepo.close(); | |||
git.add().addFilepattern(name).call(); | |||
} | |||
for (CopyFile copyfile : copyfiles) { |