]> source.dussan.org Git - jgit.git/commit
Fix serving fetch of existing shallow client 27/21227/2
authorShawn Pearce <spearce@spearce.org>
Wed, 29 Jan 2014 00:29:15 +0000 (16:29 -0800)
committerShawn Pearce <spearce@spearce.org>
Wed, 29 Jan 2014 01:29:00 +0000 (17:29 -0800)
commitb0174a089ce886d02c8d7fb80d63f0e50329bec3
treea18b1b4c34339d9d25d7752c75e62c42e6661576
parentce5fd525be80d664db5f7263f8a4c961e320940e
Fix serving fetch of existing shallow client

In certain cases a JGit server updating an existing shallow client
selected a common ancestor that was behind the shallow edge of
the client. This allowed the server to assume the client had some
objects it did not have and allowed creation of pack deltas the
client could never inflate.

Any commit the client has advertised as shallow must be treated
by UploadPack server as though it has no parents. With no parents
the walker cannot visit graph history the client does not have,
and PackWriter cannot consider delta base candidates the client
is lacking.

Change-Id: I4922b9354df9f490966a586fb693762e897345a2
org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevWalk.java
org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPack.java