|
|
@ -128,13 +128,13 @@ public class UploadPackTest { |
|
|
|
}, null); |
|
|
|
}, null); |
|
|
|
uri = testProtocol.register(ctx, server); |
|
|
|
uri = testProtocol.register(ctx, server); |
|
|
|
|
|
|
|
|
|
|
|
assertFalse(client.hasObject(commit0.toObjectId())); |
|
|
|
assertFalse(client.getObjectDatabase().has(commit0.toObjectId())); |
|
|
|
|
|
|
|
|
|
|
|
// Fetch of the parent of the shallow commit
|
|
|
|
// Fetch of the parent of the shallow commit
|
|
|
|
try (Transport tn = testProtocol.open(uri, client, "server")) { |
|
|
|
try (Transport tn = testProtocol.open(uri, client, "server")) { |
|
|
|
tn.fetch(NullProgressMonitor.INSTANCE, |
|
|
|
tn.fetch(NullProgressMonitor.INSTANCE, |
|
|
|
Collections.singletonList(new RefSpec(commit0.name()))); |
|
|
|
Collections.singletonList(new RefSpec(commit0.name()))); |
|
|
|
assertTrue(client.hasObject(commit0.toObjectId())); |
|
|
|
assertTrue(client.getObjectDatabase().has(commit0.toObjectId())); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -147,7 +147,7 @@ public class UploadPackTest { |
|
|
|
testProtocol = generateReachableCommitUploadPackProtocol(); |
|
|
|
testProtocol = generateReachableCommitUploadPackProtocol(); |
|
|
|
uri = testProtocol.register(ctx, server); |
|
|
|
uri = testProtocol.register(ctx, server); |
|
|
|
|
|
|
|
|
|
|
|
assertFalse(client.hasObject(blob.toObjectId())); |
|
|
|
assertFalse(client.getObjectDatabase().has(blob.toObjectId())); |
|
|
|
|
|
|
|
|
|
|
|
try (Transport tn = testProtocol.open(uri, client, "server")) { |
|
|
|
try (Transport tn = testProtocol.open(uri, client, "server")) { |
|
|
|
thrown.expect(TransportException.class); |
|
|
|
thrown.expect(TransportException.class); |
|
|
@ -168,12 +168,12 @@ public class UploadPackTest { |
|
|
|
testProtocol = generateReachableCommitUploadPackProtocol(); |
|
|
|
testProtocol = generateReachableCommitUploadPackProtocol(); |
|
|
|
uri = testProtocol.register(ctx, server); |
|
|
|
uri = testProtocol.register(ctx, server); |
|
|
|
|
|
|
|
|
|
|
|
assertFalse(client.hasObject(blob.toObjectId())); |
|
|
|
assertFalse(client.getObjectDatabase().has(blob.toObjectId())); |
|
|
|
|
|
|
|
|
|
|
|
try (Transport tn = testProtocol.open(uri, client, "server")) { |
|
|
|
try (Transport tn = testProtocol.open(uri, client, "server")) { |
|
|
|
tn.fetch(NullProgressMonitor.INSTANCE, |
|
|
|
tn.fetch(NullProgressMonitor.INSTANCE, |
|
|
|
Collections.singletonList(new RefSpec(blob.name()))); |
|
|
|
Collections.singletonList(new RefSpec(blob.name()))); |
|
|
|
assertTrue(client.hasObject(blob.toObjectId())); |
|
|
|
assertTrue(client.getObjectDatabase().has(blob.toObjectId())); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -186,7 +186,7 @@ public class UploadPackTest { |
|
|
|
testProtocol = generateReachableCommitUploadPackProtocol(); |
|
|
|
testProtocol = generateReachableCommitUploadPackProtocol(); |
|
|
|
uri = testProtocol.register(ctx, server); |
|
|
|
uri = testProtocol.register(ctx, server); |
|
|
|
|
|
|
|
|
|
|
|
assertFalse(client.hasObject(blob.toObjectId())); |
|
|
|
assertFalse(client.getObjectDatabase().has(blob.toObjectId())); |
|
|
|
|
|
|
|
|
|
|
|
try (Transport tn = testProtocol.open(uri, client, "server")) { |
|
|
|
try (Transport tn = testProtocol.open(uri, client, "server")) { |
|
|
|
thrown.expect(TransportException.class); |
|
|
|
thrown.expect(TransportException.class); |
|
|
@ -227,9 +227,9 @@ public class UploadPackTest { |
|
|
|
tn.setFilterBlobLimit(0); |
|
|
|
tn.setFilterBlobLimit(0); |
|
|
|
tn.fetch(NullProgressMonitor.INSTANCE, |
|
|
|
tn.fetch(NullProgressMonitor.INSTANCE, |
|
|
|
Collections.singletonList(new RefSpec(commit.name()))); |
|
|
|
Collections.singletonList(new RefSpec(commit.name()))); |
|
|
|
assertTrue(client.hasObject(tree.toObjectId())); |
|
|
|
assertTrue(client.getObjectDatabase().has(tree.toObjectId())); |
|
|
|
assertFalse(client.hasObject(blob1.toObjectId())); |
|
|
|
assertFalse(client.getObjectDatabase().has(blob1.toObjectId())); |
|
|
|
assertFalse(client.hasObject(blob2.toObjectId())); |
|
|
|
assertFalse(client.getObjectDatabase().has(blob2.toObjectId())); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -265,9 +265,9 @@ public class UploadPackTest { |
|
|
|
tn.fetch(NullProgressMonitor.INSTANCE, Arrays.asList( |
|
|
|
tn.fetch(NullProgressMonitor.INSTANCE, Arrays.asList( |
|
|
|
new RefSpec(commit.name()), |
|
|
|
new RefSpec(commit.name()), |
|
|
|
new RefSpec(blob1.name()))); |
|
|
|
new RefSpec(blob1.name()))); |
|
|
|
assertTrue(client.hasObject(tree.toObjectId())); |
|
|
|
assertTrue(client.getObjectDatabase().has(tree.toObjectId())); |
|
|
|
assertTrue(client.hasObject(blob1.toObjectId())); |
|
|
|
assertTrue(client.getObjectDatabase().has(blob1.toObjectId())); |
|
|
|
assertFalse(client.hasObject(blob2.toObjectId())); |
|
|
|
assertFalse(client.getObjectDatabase().has(blob2.toObjectId())); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -301,8 +301,8 @@ public class UploadPackTest { |
|
|
|
tn.setFilterBlobLimit(5); |
|
|
|
tn.setFilterBlobLimit(5); |
|
|
|
tn.fetch(NullProgressMonitor.INSTANCE, |
|
|
|
tn.fetch(NullProgressMonitor.INSTANCE, |
|
|
|
Collections.singletonList(new RefSpec(commit.name()))); |
|
|
|
Collections.singletonList(new RefSpec(commit.name()))); |
|
|
|
assertFalse(client.hasObject(longBlob.toObjectId())); |
|
|
|
assertFalse(client.getObjectDatabase().has(longBlob.toObjectId())); |
|
|
|
assertTrue(client.hasObject(shortBlob.toObjectId())); |
|
|
|
assertTrue(client.getObjectDatabase().has(shortBlob.toObjectId())); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -342,8 +342,8 @@ public class UploadPackTest { |
|
|
|
tn.fetch(NullProgressMonitor.INSTANCE, Arrays.asList( |
|
|
|
tn.fetch(NullProgressMonitor.INSTANCE, Arrays.asList( |
|
|
|
new RefSpec(commit.name()), |
|
|
|
new RefSpec(commit.name()), |
|
|
|
new RefSpec(blob1.name()))); |
|
|
|
new RefSpec(blob1.name()))); |
|
|
|
assertTrue(client.hasObject(blob1.toObjectId())); |
|
|
|
assertTrue(client.getObjectDatabase().has(blob1.toObjectId())); |
|
|
|
assertFalse(client.hasObject(blob2.toObjectId())); |
|
|
|
assertFalse(client.getObjectDatabase().has(blob2.toObjectId())); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -381,8 +381,8 @@ public class UploadPackTest { |
|
|
|
tn.setFilterBlobLimit(5); |
|
|
|
tn.setFilterBlobLimit(5); |
|
|
|
tn.fetch(NullProgressMonitor.INSTANCE, |
|
|
|
tn.fetch(NullProgressMonitor.INSTANCE, |
|
|
|
Collections.singletonList(new RefSpec(commit.name()))); |
|
|
|
Collections.singletonList(new RefSpec(commit.name()))); |
|
|
|
assertFalse(client.hasObject(longBlob.toObjectId())); |
|
|
|
assertFalse(client.getObjectDatabase().has(longBlob.toObjectId())); |
|
|
|
assertTrue(client.hasObject(shortBlob.toObjectId())); |
|
|
|
assertTrue(client.getObjectDatabase().has(shortBlob.toObjectId())); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -965,10 +965,10 @@ public class UploadPackTest { |
|
|
|
assertThat(pckIn.readString(), theInstance(PacketLineIn.DELIM)); |
|
|
|
assertThat(pckIn.readString(), theInstance(PacketLineIn.DELIM)); |
|
|
|
assertThat(pckIn.readString(), is("packfile")); |
|
|
|
assertThat(pckIn.readString(), is("packfile")); |
|
|
|
parsePack(recvStream); |
|
|
|
parsePack(recvStream); |
|
|
|
assertFalse(client.hasObject(fooParent.toObjectId())); |
|
|
|
assertFalse(client.getObjectDatabase().has(fooParent.toObjectId())); |
|
|
|
assertTrue(client.hasObject(fooChild.toObjectId())); |
|
|
|
assertTrue(client.getObjectDatabase().has(fooChild.toObjectId())); |
|
|
|
assertFalse(client.hasObject(barParent.toObjectId())); |
|
|
|
assertFalse(client.getObjectDatabase().has(barParent.toObjectId())); |
|
|
|
assertTrue(client.hasObject(barChild.toObjectId())); |
|
|
|
assertTrue(client.getObjectDatabase().has(barChild.toObjectId())); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
@Test |
|
|
@ -992,10 +992,10 @@ public class UploadPackTest { |
|
|
|
|
|
|
|
|
|
|
|
assertThat(pckIn.readString(), is("packfile")); |
|
|
|
assertThat(pckIn.readString(), is("packfile")); |
|
|
|
parsePack(recvStream); |
|
|
|
parsePack(recvStream); |
|
|
|
assertFalse(client.hasObject(fooParent.toObjectId())); |
|
|
|
assertFalse(client.getObjectDatabase().has(fooParent.toObjectId())); |
|
|
|
assertTrue(client.hasObject(fooChild.toObjectId())); |
|
|
|
assertTrue(client.getObjectDatabase().has(fooChild.toObjectId())); |
|
|
|
assertTrue(client.hasObject(barParent.toObjectId())); |
|
|
|
assertTrue(client.getObjectDatabase().has(barParent.toObjectId())); |
|
|
|
assertTrue(client.hasObject(barChild.toObjectId())); |
|
|
|
assertTrue(client.getObjectDatabase().has(barChild.toObjectId())); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
@Test |
|
|
@ -1078,7 +1078,7 @@ public class UploadPackTest { |
|
|
|
PacketLineIn pckIn = new PacketLineIn(recvStream); |
|
|
|
PacketLineIn pckIn = new PacketLineIn(recvStream); |
|
|
|
assertThat(pckIn.readString(), is("packfile")); |
|
|
|
assertThat(pckIn.readString(), is("packfile")); |
|
|
|
parsePack(recvStream); |
|
|
|
parsePack(recvStream); |
|
|
|
assertFalse(client.hasObject(tag.toObjectId())); |
|
|
|
assertFalse(client.getObjectDatabase().has(tag.toObjectId())); |
|
|
|
|
|
|
|
|
|
|
|
// With tag.
|
|
|
|
// With tag.
|
|
|
|
recvStream = uploadPackV2( |
|
|
|
recvStream = uploadPackV2( |
|
|
@ -1091,7 +1091,7 @@ public class UploadPackTest { |
|
|
|
pckIn = new PacketLineIn(recvStream); |
|
|
|
pckIn = new PacketLineIn(recvStream); |
|
|
|
assertThat(pckIn.readString(), is("packfile")); |
|
|
|
assertThat(pckIn.readString(), is("packfile")); |
|
|
|
parsePack(recvStream); |
|
|
|
parsePack(recvStream); |
|
|
|
assertTrue(client.hasObject(tag.toObjectId())); |
|
|
|
assertTrue(client.getObjectDatabase().has(tag.toObjectId())); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
@Test |
|
|
@ -1149,8 +1149,8 @@ public class UploadPackTest { |
|
|
|
PacketLineIn pckIn = new PacketLineIn(recvStream); |
|
|
|
PacketLineIn pckIn = new PacketLineIn(recvStream); |
|
|
|
assertThat(pckIn.readString(), is("packfile")); |
|
|
|
assertThat(pckIn.readString(), is("packfile")); |
|
|
|
parsePack(recvStream); |
|
|
|
parsePack(recvStream); |
|
|
|
assertTrue(client.hasObject(barChild.toObjectId())); |
|
|
|
assertTrue(client.getObjectDatabase().has(barChild.toObjectId())); |
|
|
|
assertFalse(client.hasObject(commonParent.toObjectId())); |
|
|
|
assertFalse(client.getObjectDatabase().has(commonParent.toObjectId())); |
|
|
|
|
|
|
|
|
|
|
|
// With shallow, the server knows that we don't have
|
|
|
|
// With shallow, the server knows that we don't have
|
|
|
|
// commonParent, so it sends it.
|
|
|
|
// commonParent, so it sends it.
|
|
|
@ -1165,7 +1165,7 @@ public class UploadPackTest { |
|
|
|
pckIn = new PacketLineIn(recvStream); |
|
|
|
pckIn = new PacketLineIn(recvStream); |
|
|
|
assertThat(pckIn.readString(), is("packfile")); |
|
|
|
assertThat(pckIn.readString(), is("packfile")); |
|
|
|
parsePack(recvStream); |
|
|
|
parsePack(recvStream); |
|
|
|
assertTrue(client.hasObject(commonParent.toObjectId())); |
|
|
|
assertTrue(client.getObjectDatabase().has(commonParent.toObjectId())); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
@Test |
|
|
@ -1188,8 +1188,8 @@ public class UploadPackTest { |
|
|
|
assertThat(pckIn.readString(), theInstance(PacketLineIn.DELIM)); |
|
|
|
assertThat(pckIn.readString(), theInstance(PacketLineIn.DELIM)); |
|
|
|
assertThat(pckIn.readString(), is("packfile")); |
|
|
|
assertThat(pckIn.readString(), is("packfile")); |
|
|
|
parsePack(recvStream); |
|
|
|
parsePack(recvStream); |
|
|
|
assertTrue(client.hasObject(child.toObjectId())); |
|
|
|
assertTrue(client.getObjectDatabase().has(child.toObjectId())); |
|
|
|
assertFalse(client.hasObject(parent.toObjectId())); |
|
|
|
assertFalse(client.getObjectDatabase().has(parent.toObjectId())); |
|
|
|
|
|
|
|
|
|
|
|
// Without that, the parent is sent too.
|
|
|
|
// Without that, the parent is sent too.
|
|
|
|
recvStream = uploadPackV2( |
|
|
|
recvStream = uploadPackV2( |
|
|
@ -1201,7 +1201,7 @@ public class UploadPackTest { |
|
|
|
pckIn = new PacketLineIn(recvStream); |
|
|
|
pckIn = new PacketLineIn(recvStream); |
|
|
|
assertThat(pckIn.readString(), is("packfile")); |
|
|
|
assertThat(pckIn.readString(), is("packfile")); |
|
|
|
parsePack(recvStream); |
|
|
|
parsePack(recvStream); |
|
|
|
assertTrue(client.hasObject(parent.toObjectId())); |
|
|
|
assertTrue(client.getObjectDatabase().has(parent.toObjectId())); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
@Test |
|
|
@ -1268,15 +1268,15 @@ public class UploadPackTest { |
|
|
|
|
|
|
|
|
|
|
|
// The server does not send this because it is committed
|
|
|
|
// The server does not send this because it is committed
|
|
|
|
// earlier than the given deepen-since time.
|
|
|
|
// earlier than the given deepen-since time.
|
|
|
|
assertFalse(client.hasObject(tooOld.toObjectId())); |
|
|
|
assertFalse(client.getObjectDatabase().has(tooOld.toObjectId())); |
|
|
|
|
|
|
|
|
|
|
|
// The server does not send this because the client claims to
|
|
|
|
// The server does not send this because the client claims to
|
|
|
|
// have it.
|
|
|
|
// have it.
|
|
|
|
assertFalse(client.hasObject(boundary.toObjectId())); |
|
|
|
assertFalse(client.getObjectDatabase().has(boundary.toObjectId())); |
|
|
|
|
|
|
|
|
|
|
|
// The server sends both these commits.
|
|
|
|
// The server sends both these commits.
|
|
|
|
assertTrue(client.hasObject(beyondBoundary.toObjectId())); |
|
|
|
assertTrue(client.getObjectDatabase().has(beyondBoundary.toObjectId())); |
|
|
|
assertTrue(client.hasObject(merge.toObjectId())); |
|
|
|
assertTrue(client.getObjectDatabase().has(merge.toObjectId())); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
@Test |
|
|
@ -1316,9 +1316,9 @@ public class UploadPackTest { |
|
|
|
parsePack(recvStream); |
|
|
|
parsePack(recvStream); |
|
|
|
|
|
|
|
|
|
|
|
// Only the children are sent.
|
|
|
|
// Only the children are sent.
|
|
|
|
assertFalse(client.hasObject(base.toObjectId())); |
|
|
|
assertFalse(client.getObjectDatabase().has(base.toObjectId())); |
|
|
|
assertTrue(client.hasObject(child1.toObjectId())); |
|
|
|
assertTrue(client.getObjectDatabase().has(child1.toObjectId())); |
|
|
|
assertTrue(client.hasObject(child2.toObjectId())); |
|
|
|
assertTrue(client.getObjectDatabase().has(child2.toObjectId())); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
@Test |
|
|
@ -1384,16 +1384,16 @@ public class UploadPackTest { |
|
|
|
|
|
|
|
|
|
|
|
// The server does not send these because they are excluded by
|
|
|
|
// The server does not send these because they are excluded by
|
|
|
|
// deepen-not.
|
|
|
|
// deepen-not.
|
|
|
|
assertFalse(client.hasObject(side.toObjectId())); |
|
|
|
assertFalse(client.getObjectDatabase().has(side.toObjectId())); |
|
|
|
assertFalse(client.hasObject(one.toObjectId())); |
|
|
|
assertFalse(client.getObjectDatabase().has(one.toObjectId())); |
|
|
|
|
|
|
|
|
|
|
|
// The server does not send this because the client claims to
|
|
|
|
// The server does not send this because the client claims to
|
|
|
|
// have it.
|
|
|
|
// have it.
|
|
|
|
assertFalse(client.hasObject(three.toObjectId())); |
|
|
|
assertFalse(client.getObjectDatabase().has(three.toObjectId())); |
|
|
|
|
|
|
|
|
|
|
|
// The server sends both these commits.
|
|
|
|
// The server sends both these commits.
|
|
|
|
assertTrue(client.hasObject(merge.toObjectId())); |
|
|
|
assertTrue(client.getObjectDatabase().has(merge.toObjectId())); |
|
|
|
assertTrue(client.hasObject(two.toObjectId())); |
|
|
|
assertTrue(client.getObjectDatabase().has(two.toObjectId())); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
@Test |
|
|
@ -1441,10 +1441,10 @@ public class UploadPackTest { |
|
|
|
assertThat(pckIn.readString(), theInstance(PacketLineIn.DELIM)); |
|
|
|
assertThat(pckIn.readString(), theInstance(PacketLineIn.DELIM)); |
|
|
|
assertThat(pckIn.readString(), is("packfile")); |
|
|
|
assertThat(pckIn.readString(), is("packfile")); |
|
|
|
parsePack(recvStream); |
|
|
|
parsePack(recvStream); |
|
|
|
assertFalse(client.hasObject(one.toObjectId())); |
|
|
|
assertFalse(client.getObjectDatabase().has(one.toObjectId())); |
|
|
|
assertFalse(client.hasObject(two.toObjectId())); |
|
|
|
assertFalse(client.getObjectDatabase().has(two.toObjectId())); |
|
|
|
assertTrue(client.hasObject(three.toObjectId())); |
|
|
|
assertTrue(client.getObjectDatabase().has(three.toObjectId())); |
|
|
|
assertTrue(client.hasObject(four.toObjectId())); |
|
|
|
assertTrue(client.getObjectDatabase().has(four.toObjectId())); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
@Test |
|
|
@ -1485,9 +1485,9 @@ public class UploadPackTest { |
|
|
|
parsePack(recvStream); |
|
|
|
parsePack(recvStream); |
|
|
|
|
|
|
|
|
|
|
|
// Only the children are sent.
|
|
|
|
// Only the children are sent.
|
|
|
|
assertFalse(client.hasObject(base.toObjectId())); |
|
|
|
assertFalse(client.getObjectDatabase().has(base.toObjectId())); |
|
|
|
assertTrue(client.hasObject(child1.toObjectId())); |
|
|
|
assertTrue(client.getObjectDatabase().has(child1.toObjectId())); |
|
|
|
assertTrue(client.hasObject(child2.toObjectId())); |
|
|
|
assertTrue(client.getObjectDatabase().has(child2.toObjectId())); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
@Test |
|
|
@ -1538,8 +1538,8 @@ public class UploadPackTest { |
|
|
|
assertThat(pckIn.readString(), is("packfile")); |
|
|
|
assertThat(pckIn.readString(), is("packfile")); |
|
|
|
parsePack(recvStream); |
|
|
|
parsePack(recvStream); |
|
|
|
|
|
|
|
|
|
|
|
assertFalse(client.hasObject(big.toObjectId())); |
|
|
|
assertFalse(client.getObjectDatabase().has(big.toObjectId())); |
|
|
|
assertTrue(client.hasObject(small.toObjectId())); |
|
|
|
assertTrue(client.getObjectDatabase().has(small.toObjectId())); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
@Test |
|
|
@ -1610,9 +1610,9 @@ public class UploadPackTest { |
|
|
|
assertThat(pckIn.readString(), is("packfile")); |
|
|
|
assertThat(pckIn.readString(), is("packfile")); |
|
|
|
parsePack(recvStream); |
|
|
|
parsePack(recvStream); |
|
|
|
|
|
|
|
|
|
|
|
assertTrue(client.hasObject(one.toObjectId())); |
|
|
|
assertTrue(client.getObjectDatabase().has(one.toObjectId())); |
|
|
|
assertTrue(client.hasObject(two.toObjectId())); |
|
|
|
assertTrue(client.getObjectDatabase().has(two.toObjectId())); |
|
|
|
assertFalse(client.hasObject(three.toObjectId())); |
|
|
|
assertFalse(client.getObjectDatabase().has(three.toObjectId())); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
@Test |
|
|
@ -1666,9 +1666,9 @@ public class UploadPackTest { |
|
|
|
assertThat(pckIn.readString(), is("packfile")); |
|
|
|
assertThat(pckIn.readString(), is("packfile")); |
|
|
|
parsePack(recvStream); |
|
|
|
parsePack(recvStream); |
|
|
|
|
|
|
|
|
|
|
|
assertTrue(client.hasObject(one.toObjectId())); |
|
|
|
assertTrue(client.getObjectDatabase().has(one.toObjectId())); |
|
|
|
assertTrue(client.hasObject(two.toObjectId())); |
|
|
|
assertTrue(client.getObjectDatabase().has(two.toObjectId())); |
|
|
|
assertFalse(client.hasObject(three.toObjectId())); |
|
|
|
assertFalse(client.getObjectDatabase().has(three.toObjectId())); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
@Test |
|
|
@ -1699,7 +1699,7 @@ public class UploadPackTest { |
|
|
|
// ... but the client does not need the object itself.
|
|
|
|
// ... but the client does not need the object itself.
|
|
|
|
assertThat(pckIn.readString(), is("packfile")); |
|
|
|
assertThat(pckIn.readString(), is("packfile")); |
|
|
|
parsePack(recvStream); |
|
|
|
parsePack(recvStream); |
|
|
|
assertFalse(client.hasObject(one.toObjectId())); |
|
|
|
assertFalse(client.getObjectDatabase().has(one.toObjectId())); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
@Test |
|
|
@ -1728,8 +1728,8 @@ public class UploadPackTest { |
|
|
|
assertThat(pckIn.readString(), theInstance(PacketLineIn.DELIM)); |
|
|
|
assertThat(pckIn.readString(), theInstance(PacketLineIn.DELIM)); |
|
|
|
assertThat(pckIn.readString(), is("packfile")); |
|
|
|
assertThat(pckIn.readString(), is("packfile")); |
|
|
|
parsePack(recvStream); |
|
|
|
parsePack(recvStream); |
|
|
|
assertTrue(client.hasObject(child.toObjectId())); |
|
|
|
assertTrue(client.getObjectDatabase().has(child.toObjectId())); |
|
|
|
assertFalse(client.hasObject(parent.toObjectId())); |
|
|
|
assertFalse(client.getObjectDatabase().has(parent.toObjectId())); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
@Test |
|
|
@ -1765,9 +1765,9 @@ public class UploadPackTest { |
|
|
|
assertThat(pckIn.readString(), is("packfile")); |
|
|
|
assertThat(pckIn.readString(), is("packfile")); |
|
|
|
parsePack(recvStream); |
|
|
|
parsePack(recvStream); |
|
|
|
|
|
|
|
|
|
|
|
assertTrue(client.hasObject(one.toObjectId())); |
|
|
|
assertTrue(client.getObjectDatabase().has(one.toObjectId())); |
|
|
|
assertTrue(client.hasObject(two.toObjectId())); |
|
|
|
assertTrue(client.getObjectDatabase().has(two.toObjectId())); |
|
|
|
assertTrue(client.hasObject(three.toObjectId())); |
|
|
|
assertTrue(client.getObjectDatabase().has(three.toObjectId())); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
@Test |
|
|
|