commit-reach: move commit_contains from ref-filter
commit920f93ca1c005a81cfb88c87fca18de5e4bde8c5
authorDerrick Stolee <dstolee@microsoft.com>
Fri, 20 Jul 2018 16:33:08 +0000 (20 16:33 +0000)
committerJunio C Hamano <gitster@pobox.com>
Fri, 20 Jul 2018 22:38:54 +0000 (20 15:38 -0700)
tree6351e076059542ce9028274216ac8cf66c92494c
parent1d614d41e5fc030bc2f2799a58791aa912f78378
commit-reach: move commit_contains from ref-filter

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.

All methods are direct moves, except we also make the commit_contains()
method public so its consumers in ref-filter.c can still call it. We can
also test this method in a test-tool in a later commit.

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