summaryrefslogtreecommitdiff
path: root/promisor-remote.h
Commit message (Collapse)AuthorAgeFilesLines
* promisor-remote: remove unused variableJonathan Tan2020-09-211-1/+1
| | | | | | | | | | | | | | | | | | The variable core_partial_clone_filter_default has been unused since fa3d1b63e8 ("promisor-remote: parse remote.*.partialclonefilter", 2019-06-25), when Git was changed to refer to remote.*.partialclonefilter as the default filter when fetching in a partial clone, but (perhaps inadvertently) there was no fallback to core.partialclonefilter. One alternative is to add the fallback, but the aforementioned change was made more than a year ago and I have not heard of any complaints regarding this matter. In addition, there is currently no mention of core.partialclonefilter in the user documentation. So it seems best to reaffirm that Git will only support remote.*.partialclonefilter. Signed-off-by: Jonathan Tan <jonathantanmy@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* promisor-remote: accept 0 as oid_nr in functionJonathan Tan2020-04-021-0/+8
| | | | | | | | | | | There are 3 callers to promisor_remote_get_direct() that first check if the number of objects to be fetched is equal to 0. Fold that check into promisor_remote_get_direct(), and in doing so, be explicit as to what promisor_remote_get_direct() does if oid_nr is 0 (it returns 0, success, immediately). Signed-off-by: Jonathan Tan <jonathantanmy@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Merge branch 'dl/honor-cflags-in-hdr-check'Junio C Hamano2019-10-071-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
| * promisor-remote.h: include missing headerDenton Liu2019-09-281-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>
* | promisor-remote.h: drop extern from function declarationDenton Liu2019-09-281-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>
* Move repository_format_partial_clone to promisor-remote.cChristian Couder2019-06-251-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>
* promisor-remote: parse remote.*.partialclonefilterChristian Couder2019-06-251-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>
* promisor-remote: add promisor_remote_reinit()Christian Couder2019-06-251-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>
* promisor-remote: implement promisor_remote_get_direct()Christian Couder2019-06-251-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>
* Add initial support for many promisor remotesChristian Couder2019-06-251-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>