Re: [PATCH/RFC/GSoC 07/17] rebase-common: implement refresh_and_write_cache()
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Mar 14, 2016, 21:10 UTC
- Message-ID
- <xmqqshzs9369.fsf@gitster.mtv.corp.google.com>
- In-Reply-To
- <1457779597-6918-8-git-send-email-pyokagan@gmail.com>
Paul Tan <pyokagan@gmail.com> writes:
Show 6 quoted lines
> In the upcoming git-rebase to C rewrite, it is a common operation to > refresh the index and write the resulting index. > > builtin/am.c already implements refresh_and_write_cache(), which is what > we want. Move it to rebase-common.c, so that it can be shared with all > the rebase backends, including git-am.
Your rebase-am might be one of the rebase backends, but git-am is not, so it is misleading to count it among "all the rebase backends".
I would think that a better home for refresh_and_write_index() is right next to write_locked_index(), with #define in cache.h for refresh_and_write_cache(), just like others.