summaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2019-12-01 17:04:38 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-12-01 17:04:38 (GMT)
commitfce9e836d395fb315bb8b77619868098a6cb02eb (patch)
tree08f7d5b4eb0c0cf663a5863ff4b5552b8d225602 /builtin
parent8faff3899e1fdefbdd143eaf5ce3b96532205bc7 (diff)
parent603960b50edeb1f0afa694f2f0283e553c031129 (diff)
downloadgit-fce9e836d395fb315bb8b77619868098a6cb02eb.zip
git-fce9e836d395fb315bb8b77619868098a6cb02eb.tar.gz
git-fce9e836d395fb315bb8b77619868098a6cb02eb.tar.bz2
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
Diffstat (limited to 'builtin')
-rw-r--r--builtin/clone.c3
-rw-r--r--builtin/fetch.c5
2 files changed, 2 insertions, 6 deletions
diff --git a/builtin/clone.c b/builtin/clone.c
index b24f04c..40c0bf2 100644
--- a/builtin/clone.c
+++ b/builtin/clone.c
@@ -927,8 +927,6 @@ int cmd_clone(int argc, const char **argv, const char *prefix)
struct argv_array ref_prefixes = ARGV_ARRAY_INIT;
- fetch_if_missing = 0;
-
packet_trace_identity("clone");
argc = parse_options(argc, argv, prefix, builtin_clone_options,
builtin_clone_usage, 0);
@@ -1265,7 +1263,6 @@ int cmd_clone(int argc, const char **argv, const char *prefix)
}
junk_mode = JUNK_LEAVE_REPO;
- fetch_if_missing = 1;
err = checkout(submodule_progress);
strbuf_release(&reflog_msg);
diff --git a/builtin/fetch.c b/builtin/fetch.c
index 256a6a6..46ce7c2 100644
--- a/builtin/fetch.c
+++ b/builtin/fetch.c
@@ -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);