summaryrefslogtreecommitdiff
path: root/promisor-remote.h
AgeCommit message (Collapse)AuthorFilesLines
2019-10-07Merge branch 'dl/honor-cflags-in-hdr-check'Libravatar Junio C Hamano1-0/+2
Dev support. * dl/honor-cflags-in-hdr-check: ci: run `hdr-check` as part of the `Static Analysis` job Makefile: emulate compile in $(HCO) target better pack-bitmap.h: remove magic number promisor-remote.h: include missing header apply.h: include missing header
2019-09-28promisor-remote.h: include missing headerLibravatar Denton Liu1-0/+2
When we ran `make hdr-check`, we got the following warning message: promisor-remote.h:21:46: warning: declaration of 'struct repository' will not be visible outside of this function [-Wvisibility] extern int promisor_remote_get_direct(struct repository *repo, ^ 1 warning generated. This was caused by a missing reference to `struct repository`, which is defined in "repository.h". Include this missing header to fix this warning. Signed-off-by: Denton Liu <liu.denton@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-09-28promisor-remote.h: drop extern from function declarationLibravatar Denton Liu1-7/+7
During the creation of this file, each time a new function declaration was introduced, it included an `extern`. However, starting from 554544276a (*.[ch]: remove extern from function declarations using spatch, 2019-04-29), we've been actively trying to prevent externs from being used in function declarations because they're unnecessary. Remove these spurious `extern`s. Signed-off-by: Denton Liu <liu.denton@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-06-25Move repository_format_partial_clone to promisor-remote.cLibravatar Christian Couder1-0/+6
Now that we have has_promisor_remote() and can use many promisor remotes, let's hide repository_format_partial_clone as a static in promisor-remote.c to avoid it being use for anything other than managing backward compatibility. Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-06-25promisor-remote: parse remote.*.partialclonefilterLibravatar Christian Couder1-1/+4
This makes it possible to specify a different partial clone filter for each promisor remote. Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-06-25promisor-remote: add promisor_remote_reinit()Libravatar Christian Couder1-0/+1
We will need to reinitialize the promisor remote configuration as we will make some changes to it in a later commit. Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-06-25promisor-remote: implement promisor_remote_get_direct()Libravatar Christian Couder1-0/+5
This is implemented for now by calling fetch_objects(). It fetches from all the promisor remotes. Helped-by: Ramsay Jones <ramsay@ramsayjones.plus.com> Helped-by: Derrick Stolee <stolee@gmail.com> Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-06-25Add initial support for many promisor remotesLibravatar Christian Couder1-0/+16
The promisor-remote.{c,h} files will contain functions to manage many promisor remotes. We expect that there will not be a lot of promisor remotes, so it is ok to use a simple linked list to manage them. Helped-by: Jeff King <peff@peff.net> Helped-by: SZEDER Gábor <szeder.dev@gmail.com> Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>