Skip to content

Commit eb0cbee

Browse files
committed
fetch-pack: remove fetch_if_missing=0
Commit 6462d5e ("fetch: remove fetch_if_missing=0", 2019-11-08) strove to remove the need for fetch_if_missing=0 from the fetching mechanism, so it is plausible to attempt removing fetch_if_missing=0 from fetch-pack as well. Signed-off-by: Hariom Verma <hariom18599@gmail.com>
1 parent be8661a commit eb0cbee

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

builtin/fetch-pack.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,6 @@ int cmd_fetch_pack(int argc, const char **argv, const char *prefix)
5757
struct packet_reader reader;
5858
enum protocol_version version;
5959

60-
fetch_if_missing = 0;
61-
6260
packet_trace_identity("fetch-pack");
6361

6462
memset(&args, 0, sizeof(args));

fetch-pack.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1649,7 +1649,7 @@ static void update_shallow(struct fetch_pack_args *args,
16491649
struct oid_array extra = OID_ARRAY_INIT;
16501650
struct object_id *oid = si->shallow->oid;
16511651
for (i = 0; i < si->shallow->nr; i++)
1652-
if (has_object_file(&oid[i]))
1652+
if (has_object_file_with_flags(&oid[i], OBJECT_INFO_SKIP_FETCH_OBJECT))
16531653
oid_array_append(&extra, &oid[i]);
16541654
if (extra.nr) {
16551655
setup_alternate_shallow(&shallow_lock,

0 commit comments

Comments
 (0)