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>
Showing
- org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/ReceivePackRefFilterTest.java 477 additions, 0 deletions.../org/eclipse/jgit/transport/ReceivePackRefFilterTest.java
- org.eclipse.jgit/src/org/eclipse/jgit/transport/ReceivePack.java 23 additions, 3 deletions...ipse.jgit/src/org/eclipse/jgit/transport/ReceivePack.java
- org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportLocal.java 10 additions, 2 deletions...e.jgit/src/org/eclipse/jgit/transport/TransportLocal.java
Loading
Please register or sign in to comment