From: Taylor Blau Date: Thu, 04 Mar 2021 03:06:38 GMT Subject: Re: [PATCH v2 15/15] pack-revindex: write multi-pack reverse indexes Message-ID: In-Reply-To: <20210304020444.1803406-1-jonathantanmy@google.com> On Wed, Mar 03, 2021 at 06:04:44PM -0800, Jonathan Tan wrote: > > > Any reason why we're using 2 separate "if" statements? > > > > Yeah. This first if statement will turn into: > > > > if (flags & (MIDX_WRITE_REV_INDEX | MIDX_WRITE_BITMAP)) > > > > so that the pack order is computed in either case (since both the > > existing write_midx_reverse_index() and the eventual write_midx_bitmap() > > will be able to use the pack order). > > Ah, OK. That's what I was thinking of, but nice to have confirmation. > Maybe write in the commit message that these are separated because in > the future, one of the conditions will change. Thanks; that's a great idea. Thanks, Taylor