diff options
Diffstat (limited to 'org.eclipse.jgit.junit/src/org/eclipse/jgit')
-rw-r--r-- | org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/TestRepository.java | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/TestRepository.java b/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/TestRepository.java index 24f7741f16..0232156a49 100644 --- a/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/TestRepository.java +++ b/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/TestRepository.java @@ -915,9 +915,8 @@ public class TestRepository<R extends Repository> implements AutoCloseable { all.add(r.getObjectId()); pw.preparePack(m, all, PackWriter.NONE); - final ObjectId name = pw.computeName(); - - pack = nameFor(odb, name, ".pack"); + pack = new PackFile(odb.getPackDirectory(), pw.computeName(), + PackExt.PACK); try (OutputStream out = new BufferedOutputStream(new FileOutputStream(pack))) { pw.writePack(m, m, out); @@ -962,12 +961,6 @@ public class TestRepository<R extends Repository> implements AutoCloseable { } } - private static PackFile nameFor(ObjectDirectory odb, ObjectId name, - String t) { - File packdir = odb.getPackDirectory(); - return new PackFile(packdir, "pack-" + name.name() + t); - } - private void writeFile(File p, byte[] bin) throws IOException, ObjectWritingException { final LockFile lck = new LockFile(p); |