From: Junio C Hamano Date: Tue, 03 Jul 2018 19:44:05 GMT Subject: Re: [PATCH v2 2/9] index_has_changes(): avoid assuming operating on the_index Message-ID: In-Reply-To: <20180701012503.14382-3-newren@gmail.com> Elijah Newren writes: > Modify index_has_changes() to take a struct istate* instead of just > operating on the_index. This is only a partial conversion, though, > because we call do_diff_cache() which implicitly assumes work is to be > done on the_index. Ongoing work is being done elsewhere to do the > remainder of the conversion, and thus is not duplicated here. Instead, > a simple check is put in place until that work is complete. Yeah, that is an unfortunate but necessary compromise until we create do_diff_index() that can take an istate, and optionally turn do_diff_cache() into #define do_diff_cache(...) do_diff_index(&the_index, ...) if there are many callers that want to work on the default in-core istate.