Re: [PATCH 5/9] repack: refactor finishing pack-objects command
- From
Christian Couder <christian.couder@gmail.com>
- Date
- Jun 21, 2023, 11:19 UTC
- Message-ID
- <CAP8UFD0F-n51+4V7Bykb27Px-fUNqk5rpKr5rOj9Ex2tZZXPnA@mail.gmail.com>
- In-Reply-To
- <ZJLZnS1olivaQ+GH@nand.local>
On Wed, Jun 21, 2023 at 1:06 PM Taylor Blau <me@ttaylorr.com> wrote:
Show 13 quoted lines
> > On Thu, Jun 15, 2023 at 05:13:14PM -0700, Junio C Hamano wrote: > > Computing "is it local?" based on the value of "destination" feels > > it belongs to the caller (one of the callers that do need the > > computation), not to this function, especially given that the full > > value of "destination" is not even used in any other way in this > > function. And the "is_local?" bit can instead be passesd into this > > helper function as a parameter. > > Hah. I had the same suggestion down-thread, but hadn't read your reply > yet. There are either a couple of changes we could make to > skip_prefix(), or foist the responsibility onto the caller (I tend to > prefer the latter).
Ok, I will make callers compute the "is_local?" bit and pass it to the helper function as a parameter.