Re: [PATCH v3 4/4] commit: rewrite read_graft_line
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Aug 18, 2017, 18:29 UTC
- Message-ID
- <xmqqtw14bugt.fsf@gitster.mtv.corp.google.com>
- In-Reply-To
- <CAJfL8+Tkb1KOn6bTGd8QPwr3=GgxKNZbp9OD_RmNeN4w-Os-iw@mail.gmail.com>
Patryk Obara <patryk.obara@gmail.com> writes:
> Ah! I presumed two separate loops, one throwing away oids and second > one actually filling a table - this makes more sense. I was just about > to send v4, but will rewrite the last patch and we'll see how it looks > like.
Yeah, it is understandable if you missed my "a loop that runs exactly twice", as that pattern, while we do use it in a few places in our codebase, is of limited applicability in general---the cost of discarded computation in the first pass need to be low enough for the improved maintainability to make sense.