Merge branch 'jt/fetch-remove-lazy-fetch-plugging'

"git fetch" codepath had a big "do not lazily fetch missing objects
when I ask if something exists" switch.  This has been corrected by
marking the "does this thing exist?" calls with "if not please do not
lazily fetch it" flag.

* jt/fetch-remove-lazy-fetch-plugging:
  promisor-remote: remove fetch_if_missing=0
  clone: remove fetch_if_missing=0
  fetch: remove fetch_if_missing=0
This commit is contained in:
Junio C Hamano
2019-12-01 09:04:38 -08:00
6 changed files with 108 additions and 25 deletions

View File

@ -1077,7 +1077,8 @@ static int check_exist_and_connected(struct ref *ref_map)
* we need all direct targets to exist.
*/
for (r = rm; r; r = r->next) {
if (!has_object_file(&r->old_oid))
if (!has_object_file_with_flags(&r->old_oid,
OBJECT_INFO_SKIP_FETCH_OBJECT))
return -1;
}
@ -1826,8 +1827,6 @@ int cmd_fetch(int argc, const char **argv, const char *prefix)
}
}
fetch_if_missing = 0;
if (remote) {
if (filter_options.choice || has_promisor_remote())
fetch_one_setup_partial(remote);