From: Junio C Hamano Date: Thu, 16 Jul 2026 15:28:53 GMT Subject: Re: [PATCH v1] repository: move fetch_if_missing into struct repository Message-ID: In-Reply-To: Patrick Steinhardt writes: >> /* >> * 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; >> - >> - show_usage_if_asked(argc, argv, index_pack_usage); >> + if (repo) >> + repo->fetch_if_missing = 0; >> >> disable_replace_refs(); >> > > Okay. This command can run without a repository, in which case we'll end > up just indexing the pack. My assumption is that we'll probably end up > using `the_repository` if so, as we still use `the_repository` in this > file. So could this here cause a change in behaviour? Meaning that even outside a repository, we could have read the setting from ~/.gitconfig or some other places other than the per-repository .git/config file?