Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDerrick Stolee <dstolee@microsoft.com>2018-07-20 19:33:06 +0300
committerJunio C Hamano <gitster@pobox.com>2018-07-21 01:38:54 +0300
commit1d614d41e5fc030bc2f2799a58791aa912f78378 (patch)
tree9f3c355e56968b1f3fcdbdfc318e8a65c8c0f100 /commit-reach.h
parent6404355657fb3ec27668fb88c5175bb22aff3acc (diff)
commit-reach: move ref_newer from remote.c
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 ref_newer() method is used by 'git push -f' to check if a force-push is necessary. By making the method public, we make it possible to test the method directly without setting up an envieronment where a 'git push' call makes sense. Signed-off-by: Derrick Stolee <dstolee@microsoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'commit-reach.h')
-rw-r--r--commit-reach.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/commit-reach.h b/commit-reach.h
index 1ea2696e40..f1cf9bfcd8 100644
--- a/commit-reach.h
+++ b/commit-reach.h
@@ -39,4 +39,6 @@ struct commit_list *reduce_heads(struct commit_list *heads);
*/
void reduce_heads_replace(struct commit_list **heads);
+int ref_newer(const struct object_id *new_oid, const struct object_id *old_oid);
+
#endif