]> git.ipfire.org Git - thirdparty/git.git/commit - commit-reach.h
commit-reach: move can_all_from_reach_with_flags
authorDerrick Stolee <dstolee@microsoft.com>
Fri, 20 Jul 2018 16:33:13 +0000 (16:33 +0000)
committerJunio C Hamano <gitster@pobox.com>
Fri, 20 Jul 2018 22:38:55 +0000 (15:38 -0700)
commitba3ca1edce70d9d2d0eea1ac69377ae786e9413a
tree9175b28af67b595a275d0613b4fb9a7c3efa9a0e
parent118be5785e2c8c90e7407bad4b4a33319ff47db3
commit-reach: move can_all_from_reach_with_flags

There are several commit walks in the codebase. Group them together into
a new commit-reach.c file and corresponding header. After we group these
walks into one place, we can reduce duplicate logic by calling
equivalent methods.

The can_all_from_reach_with_flags method is used in a stateful way by
upload-pack.c. The parameters are very flexible, so we will be able to
use its commit walking logic for many other callers.

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
commit-reach.c
commit-reach.h
object.h
upload-pack.c