diff options
author | Derrick Stolee <dstolee@microsoft.com> | 2018-07-20 16:33:06 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-07-20 15:38:54 -0700 |
commit | 1d614d41e5fc030bc2f2799a58791aa912f78378 (patch) | |
tree | 9f3c355e56968b1f3fcdbdfc318e8a65c8c0f100 /builtin | |
parent | 6404355657fb3ec27668fb88c5175bb22aff3acc (diff) | |
download | git-1d614d41e5fc030bc2f2799a58791aa912f78378.tar.gz |
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 'builtin')
-rw-r--r-- | builtin/remote.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/builtin/remote.c b/builtin/remote.c index c74ee88690..79b0326446 100644 --- a/builtin/remote.c +++ b/builtin/remote.c @@ -10,6 +10,7 @@ #include "refspec.h" #include "object-store.h" #include "argv-array.h" +#include "commit-reach.h" static const char * const builtin_remote_usage[] = { N_("git remote [-v | --verbose]"), |