From: Junio C Hamano Date: Mon, 14 Mar 2016 21:10:06 GMT Subject: Re: [PATCH/RFC/GSoC 07/17] rebase-common: implement refresh_and_write_cache() Message-ID: In-Reply-To: <1457779597-6918-8-git-send-email-pyokagan@gmail.com> Paul Tan writes: > 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.