]> source.dussan.org Git - jgit.git/commit
UploadPack: support deepen-since in protocol v2 85/129285/3
authorJonathan Tan <jonathantanmy@google.com>
Wed, 12 Sep 2018 19:32:27 +0000 (12:32 -0700)
committerJonathan Tan <jonathantanmy@google.com>
Thu, 27 Sep 2018 21:43:05 +0000 (14:43 -0700)
commit1bb430dc215f6522b62bab9b5f3c2663d522dc6a
treef335415da34c54e2ed931ad45cd69ce7c580fb3f
parent953cf2c9dab3ee2a4e1fefa87ea87c7b8b1eb18f
UploadPack: support deepen-since in protocol v2

Support the deepen-since parameter when requested by a client using
protocol v2. This is done by:
 - adding a DepthWalk.RevWalk#setDeepenSince method
 - updating DepthGenerator to recognize when deepen-since is set
 - recording in DepthWalk.Commit whether a commit is a boundary commit

Existing users of DepthWalk such as UploadPack previously recognized
boundary commits by comparing their depths against the threshold, not
tracking whether any parents were truly excluded. This behavior is
preserved - UploadPack considers a commit as boundary if its depth is
equal to the threshold *or* a parent was excluded (whether by depth or
by deepen-since).

Change-Id: I852bba6b1279f9cc8aee38282e9339d62b8dcddc
Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/UploadPackTest.java
org.eclipse.jgit/src/org/eclipse/jgit/revwalk/DepthGenerator.java
org.eclipse.jgit/src/org/eclipse/jgit/revwalk/DepthWalk.java
org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPack.java