ReceivePack: fix ensureProvidedObjectsVisible on thin packs
commit7a91b180c193fa9fc168e4ccdf2215a41db73353
authorShawn O. Pearce <spearce@spearce.org>
Wed, 14 Apr 2010 23:53:43 +0000 (14 16:53 -0700)
committerShawn O. Pearce <spearce@spearce.org>
Fri, 16 Apr 2010 23:32:23 +0000 (16 16:32 -0700)
tree71ee40c712ebf7f43ab436ed42852f1b5fa2c55c
parent466bec3cc9dad4166f80d05044111f9198308f8a
ReceivePack: fix ensureProvidedObjectsVisible on thin packs

If ensureProvidedObjectsVisible is enabled we expected any trees or
blobs directly reachable from an advertised reference to be marked
with UNINTERESTING.  Unfortunately ObjectWalk doesn't bother setting
this until the traversal is complete.  Even then it won't necessarily
set it on every tree if the corresponding commit wasn't popped.

When we are going to check the base objects for the received pack,
ensure the UNINTERESTING flag gets carried into every immediately
reachable tree or blob, because these are the ones that the client
might try to use as delta bases in a thin pack.

Change-Id: I5d5fdcf07e25ac9fc360e79a25dff491925e4101
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/ReceivePackRefFilterTest.java [new file with mode: 0644]
org.eclipse.jgit/src/org/eclipse/jgit/transport/ReceivePack.java
org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportLocal.java