Re: [PATCH v9 33/41] environment: add set_index_file()
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Aug 1, 2016, 20:37 UTC
- Message-ID
- <xmqqlh0gi5sv.fsf@gitster.mtv.corp.google.com>
- In-Reply-To
- <CAGZ79kYzxCq6M49Zmf_4J7xTdXHMunvgPuFaLnV7fXtuTbEogQ@mail.gmail.com>
Stefan Beller <sbeller@google.com> writes:
Show 6 quoted lines
> In cache.h we have a NO_THE_INDEX_COMPATIBILITY_MACROS, > and lots of > #define foo_bar(..) frob_bar(&the_index, (..)) > > Could you operate on the raw functions that take pointers to &the_index > and point these to a temporary index?
Isn't mention of the_index is a red-herring?
The in-core index_state does not even know what file it needs to be written to, so whether you explicitly specify your own index or use the compat macros to access the_index, you would need to specify to which file you would write it out or from which file you would read the new contents.