diff options
author | Junio C Hamano <gitster@pobox.com> | 2019-09-18 20:50:09 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-09-18 20:50:09 +0200 |
commit | b9ac6c59b82dead613b31a51c8bca4dbd441bcbe (patch) | |
tree | dc91493ac2c087053c15b7b431da943e7abe701a /unpack-trees.c | |
parent | Merge branch 'sg/line-log-tree-diff-optim' (diff) | |
parent | Move core_partial_clone_filter_default to promisor-remote.c (diff) | |
download | git-b9ac6c59b82dead613b31a51c8bca4dbd441bcbe.tar.xz git-b9ac6c59b82dead613b31a51c8bca4dbd441bcbe.zip |
Merge branch 'cc/multi-promisor'
Teach the lazy clone machinery that there can be more than one
promisor remote and consult them in order when downloading missing
objects on demand.
* cc/multi-promisor:
Move core_partial_clone_filter_default to promisor-remote.c
Move repository_format_partial_clone to promisor-remote.c
Remove fetch-object.{c,h} in favor of promisor-remote.{c,h}
remote: add promisor and partial clone config to the doc
partial-clone: add multiple remotes in the doc
t0410: test fetching from many promisor remotes
builtin/fetch: remove unique promisor remote limitation
promisor-remote: parse remote.*.partialclonefilter
Use promisor_remote_get_direct() and has_promisor_remote()
promisor-remote: use repository_format_partial_clone
promisor-remote: add promisor_remote_reinit()
promisor-remote: implement promisor_remote_get_direct()
Add initial support for many promisor remotes
fetch-object: make functions return an error code
t0410: remove pipes after git commands
Diffstat (limited to 'unpack-trees.c')
-rw-r--r-- | unpack-trees.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/unpack-trees.c b/unpack-trees.c index 50f257bd5c..9c25126aec 100644 --- a/unpack-trees.c +++ b/unpack-trees.c @@ -16,7 +16,7 @@ #include "submodule-config.h" #include "fsmonitor.h" #include "object-store.h" -#include "fetch-object.h" +#include "promisor-remote.h" /* * Error messages expected by scripts out of plumbing commands such as @@ -400,7 +400,7 @@ static int check_updates(struct unpack_trees_options *o) load_gitmodules_file(index, &state); enable_delayed_checkout(&state); - if (repository_format_partial_clone && o->update && !o->dry_run) { + if (has_promisor_remote() && o->update && !o->dry_run) { /* * Prefetch the objects that are to be checked out in the loop * below. @@ -419,8 +419,8 @@ static int check_updates(struct unpack_trees_options *o) oid_array_append(&to_fetch, &ce->oid); } if (to_fetch.nr) - fetch_objects(repository_format_partial_clone, - to_fetch.oid, to_fetch.nr); + promisor_remote_get_direct(the_repository, + to_fetch.oid, to_fetch.nr); oid_array_clear(&to_fetch); } for (i = 0; i < index->cache_nr; i++) { |