diff options
Diffstat (limited to 'builtin/pack-objects.c')
| -rw-r--r-- | builtin/pack-objects.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/builtin/pack-objects.c b/builtin/pack-objects.c index 59d640d9f2..4fd88476dd 100644 --- a/builtin/pack-objects.c +++ b/builtin/pack-objects.c @@ -226,7 +226,7 @@ static int delta_search_threads; static int pack_to_stdout; static int sparse; static int thin; -static int path_walk; +static int path_walk = -1; static int num_preferred_base; static struct progress *progress_state; @@ -4230,7 +4230,7 @@ static int add_objects_by_path(const char *path, struct object_id *oid = &oids->oid[i]; /* Skip objects that do not exist locally. */ - if (exclude_promisor_objects && + if ((exclude_promisor_objects || arg_missing_action != MA_ERROR) && oid_object_info_extended(the_repository, oid, &oi, OBJECT_INFO_FOR_PREFETCH) < 0) continue; @@ -4648,6 +4648,14 @@ int cmd_pack_objects(int argc, if (pack_to_stdout != !base_name || argc) usage_with_options(pack_usage, pack_objects_options); + if (path_walk < 0) { + if (use_bitmap_index > 0 || + !use_internal_rev_list) + path_walk = 0; + else + path_walk = git_env_bool("GIT_TEST_PACK_PATH_WALK", 0); + } + if (depth < 0) depth = 0; if (depth >= (1 << OE_DEPTH_BITS)) { |
