|
|
@ -126,8 +126,9 @@ public class BundleWriterTest extends SampleDataRepositoryTestCase { |
|
|
|
assertNull(newRepo.resolve("refs/heads/a")); |
|
|
|
assertNull(newRepo.resolve("refs/heads/a")); |
|
|
|
|
|
|
|
|
|
|
|
// Next an incremental bundle
|
|
|
|
// Next an incremental bundle
|
|
|
|
|
|
|
|
try (RevWalk rw = new RevWalk(db)) { |
|
|
|
bundle = makeBundle("refs/heads/cc", db.resolve("c").name(), |
|
|
|
bundle = makeBundle("refs/heads/cc", db.resolve("c").name(), |
|
|
|
new RevWalk(db).parseCommit(db.resolve("a").toObjectId())); |
|
|
|
rw.parseCommit(db.resolve("a").toObjectId())); |
|
|
|
fetchResult = fetchFromBundle(newRepo, bundle); |
|
|
|
fetchResult = fetchFromBundle(newRepo, bundle); |
|
|
|
advertisedRef = fetchResult.getAdvertisedRef("refs/heads/cc"); |
|
|
|
advertisedRef = fetchResult.getAdvertisedRef("refs/heads/cc"); |
|
|
|
assertEquals(db.resolve("c").name(), advertisedRef.getObjectId().name()); |
|
|
|
assertEquals(db.resolve("c").name(), advertisedRef.getObjectId().name()); |
|
|
@ -146,6 +147,7 @@ public class BundleWriterTest extends SampleDataRepositoryTestCase { |
|
|
|
.indexOf(db.resolve("refs/heads/a").name()) >= 0); |
|
|
|
.indexOf(db.resolve("refs/heads/a").name()) >= 0); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
@Test |
|
|
|
public void testAbortWrite() throws Exception { |
|
|
|
public void testAbortWrite() throws Exception { |
|
|
|