From: Junio C Hamano Date: Fri, 25 Oct 2019 02:38:00 GMT Subject: Re: [PATCH v3] fetch: delay fetch_if_missing=0 until after config Message-ID: In-Reply-To: <20191024191804.57275-1-jonathantanmy@google.com> Jonathan Tan writes: > To me, this is moving a band-aid, not adding another one. But to the Fair enough. > Sifting calls into two categories might work, but it's error-prone in > that we would have to do the same line-by-line analysis we did when we > added the repository argument to many functions, and we would have to > modify functions like parse_commit() to take a flag similar to > OBJECT_INFO_SKIP_FETCH_OBJECT. Also, we would have to do the same > careful inspection for future patches. Absolutely. That is the price to pay for the lazy-fetch feature. > Instead, we can control whether a region of code lazy-fetches... The approach "from here to there, we can set global to forbid lazy-fetch" may prolong the life support of the quick-and-dirty mechanism, but it has to assume you can say "from here to there"; it would mean that we cannot go multi-threaded until we get off of it. That is why I said it may be time for us to wean us off of the quick-and-dirty hack that helped us bootstrapping the initial implementation of lazy clone.