Re: [PATCH v2 00/22] Kill the_index part 5
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Nov 12, 2018, 05:53 UTC
- Message-ID
- <xmqqftw63kpq.fsf@gitster-ct.c.googlers.com>
- In-Reply-To
- <20181110054910.10568-1-pclouds@gmail.com>
Nguyễn Thái Ngọc Duy <pclouds@gmail.com> writes:
Show 5 quoted lines
> I did start pushing the_repository out of library code [1] in the bottom > half of this series. There aren't big surprises except that cache-tree > API now take _both_ struct repository and struct index_state. The > reason is cache-tree can work on temporary indexes and repo->index is > about $GIT_DIR/index.
Yes, this is very sensible, and I expect many more functions would (and probably should) follow suit, as we'd want to be able to work with temporary index (not in the sense that we'll write out on-disk temporary index, but multiple in-core instances of istate that is not necessarily tied to the current or the next state of $GIT_DIR/index) from more places.