summaryrefslogtreecommitdiff
path: root/remote.h
diff options
context:
space:
mode:
authorDerrick Stolee <dstolee@microsoft.com>2018-07-20 16:33:06 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-07-20 22:38:54 (GMT)
commit1d614d41e5fc030bc2f2799a58791aa912f78378 (patch)
tree9f3c355e56968b1f3fcdbdfc318e8a65c8c0f100 /remote.h
parent6404355657fb3ec27668fb88c5175bb22aff3acc (diff)
downloadgit-1d614d41e5fc030bc2f2799a58791aa912f78378.zip
git-1d614d41e5fc030bc2f2799a58791aa912f78378.tar.gz
git-1d614d41e5fc030bc2f2799a58791aa912f78378.tar.bz2
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 'remote.h')
-rw-r--r--remote.h1
1 files changed, 0 insertions, 1 deletions
diff --git a/remote.h b/remote.h
index 45ecc6c..56fb9cb 100644
--- a/remote.h
+++ b/remote.h
@@ -149,7 +149,6 @@ extern struct ref **get_remote_refs(int fd_out, struct packet_reader *reader,
const struct string_list *server_options);
int resolve_remote_symref(struct ref *ref, struct ref *list);
-int ref_newer(const struct object_id *new_oid, const struct object_id *old_oid);
/*
* Remove and free all but the first of any entries in the input list