]> git.ipfire.org Git - thirdparty/git.git/commit - revision.h
rev-list: support termination at promisor objects
authorJonathan Tan <jonathantanmy@google.com>
Fri, 8 Dec 2017 15:27:15 +0000 (15:27 +0000)
committerJunio C Hamano <gitster@pobox.com>
Fri, 8 Dec 2017 17:52:42 +0000 (09:52 -0800)
commitdf11e1964825b825e179ccdbc1b9e3a6fc09e67a
tree210e130e164631e65a6c2f4ad370dc9fbf785647
parent8b4c0103a98239287176a537f7a04d9b07b49125
rev-list: support termination at promisor objects

Teach rev-list to support termination of an object traversal at any
object from a promisor remote (whether one that the local repo also has,
or one that the local repo knows about because it has another promisor
object that references it).

This will be used subsequently in gc and in the connectivity check used
by fetch.

For efficiency, if an object is referenced by a promisor object, and is
in the local repo only as a non-promisor object, object traversal will
not stop there. This is to avoid building the list of promisor object
references.

(In list-objects.c, the case where obj is NULL in process_blob() and
process_tree() do not need to be changed because those happen only when
there is a conflict between the expected type and the existing object.
If the object doesn't exist, an object will be synthesized, which is
fine.)

Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/rev-list-options.txt
builtin/rev-list.c
list-objects.c
object.c
revision.c
revision.h
t/t0410-partial-clone.sh