From: "Hariom Verma via GitGitGadget" <gitgitgadget@gmail.com>
To: git@vger.kernel.org
Cc: Hariom Verma <hariom18599@gmail.com>,
Hariom Verma <hariom18599@gmail.com>
Subject: [PATCH 2/2] index-pack: remove fetch_if_missing=0
Date: Mon, 20 Apr 2020 19:54:37 +0000 [thread overview]
Message-ID: <82f7473d3b8225771bbf09023ad2b5b787261dd0.1587412477.git.gitgitgadget@gmail.com> (raw)
In-Reply-To: <pull.606.git.1587412477.gitgitgadget@gmail.com>
From: Hariom Verma <hariom18599@gmail.com>
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 index-pack as well.
Signed-off-by: Hariom Verma <hariom18599@gmail.com>
---
builtin/index-pack.c | 11 ++---------
1 file changed, 2 insertions(+), 9 deletions(-)
diff --git a/builtin/index-pack.c b/builtin/index-pack.c
index d967d188a30..9847baaf3f4 100644
--- a/builtin/index-pack.c
+++ b/builtin/index-pack.c
@@ -782,7 +782,8 @@ static void sha1_object(const void *data, struct object_entry *obj_entry,
if (startup_info->have_repository) {
read_lock();
collision_test_needed =
- has_object_file_with_flags(oid, OBJECT_INFO_QUICK);
+ has_object_file_with_flags(oid, OBJECT_INFO_QUICK |
+ OBJECT_INFO_SKIP_FETCH_OBJECT);
read_unlock();
}
@@ -1673,14 +1674,6 @@ int cmd_index_pack(int argc, const char **argv, const char *prefix)
unsigned foreign_nr = 1; /* zero is a "good" value, assume bad */
int report_end_of_input = 0;
- /*
- * index-pack never needs to fetch missing objects except when
- * REF_DELTA bases are missing (which are explicitly handled). It only
- * accesses the repo to do hash collision checks and to check which
- * REF_DELTA bases need to be fetched.
- */
- fetch_if_missing = 0;
-
if (argc == 2 && !strcmp(argv[1], "-h"))
usage(index_pack_usage);
--
gitgitgadget
next prev parent reply other threads:[~2020-04-20 19:54 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-20 19:54 [PATCH 0/2] [WIP] removed fetch_if_missing global Hariom Verma via GitGitGadget
2020-04-20 19:54 ` [PATCH 1/2] fetch-pack: remove fetch_if_missing=0 Hariom Verma via GitGitGadget
2020-05-07 13:17 ` Christian Couder
2020-05-07 15:02 ` Junio C Hamano
2020-05-09 17:48 ` Hariom verma
2020-05-09 17:40 ` Hariom verma
2020-05-07 19:43 ` Jonathan Tan
2020-05-09 18:00 ` Hariom verma
2023-02-20 18:13 ` Kousik Sanagavarapu
2023-02-22 18:19 ` Jonathan Tan
2023-02-22 17:45 ` Kousik Sanagavarapu
2020-04-20 19:54 ` Hariom Verma via GitGitGadget [this message]
2020-05-07 13:10 ` [PATCH 0/2] [WIP] removed fetch_if_missing global Christian Couder
2020-05-09 17:35 ` Hariom verma
2023-02-17 17:20 ` Kousik Sanagavarapu
2023-02-18 17:00 ` Christian Couder
2023-02-19 3:57 ` Kousik Sanagavarapu
2023-02-19 7:37 ` Christian Couder
2023-02-19 10:40 ` Hariom verma
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=82f7473d3b8225771bbf09023ad2b5b787261dd0.1587412477.git.gitgitgadget@gmail.com \
--to=gitgitgadget@gmail.com \
--cc=git@vger.kernel.org \
--cc=hariom18599@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).