]> source.dussan.org Git - jgit.git/commit
DepthGenerator: remove redundant depth check 84/129284/2
authorJonathan Tan <jonathantanmy@google.com>
Wed, 12 Sep 2018 19:49:40 +0000 (12:49 -0700)
committerJonathan Tan <jonathantanmy@google.com>
Thu, 27 Sep 2018 21:35:29 +0000 (14:35 -0700)
commit953cf2c9dab3ee2a4e1fefa87ea87c7b8b1eb18f
treee5db669b7d48617d5f9a105e8c37c33e8a88117c
parentb2ee02f53b75f1358f5784d60880f5a4be9a1d72
DepthGenerator: remove redundant depth check

In DepthGenerator, commits are always added to the "pending" queue
either at depth 0 (in the constructor) or after a depth check (in
next()), so it is redundant to check for depth after removing them from
the queue. Remove the check.

This redundancy seems to have been present since the introduction of
server-side shallow clone support in commit 9952223e06 ("Implement
server support for shallow clones", 2011-08-21).

Change-Id: Iad334935293367400c2901a25c0f4bf36c437cf2
Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
org.eclipse.jgit/src/org/eclipse/jgit/revwalk/DepthGenerator.java