Re: [PATCHv2 1/7] list-objects.c: factor out traverse_trees_and_blobs
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Nov 1, 2017, 03:46 UTC
- Message-ID
- <xmqqvaiuvey8.fsf@gitster.mtv.corp.google.com>
- In-Reply-To
- <20171031211852.13001-2-sbeller@google.com>
Stefan Beller <sbeller@google.com> writes:
Show 9 quoted lines
> With traverse_trees_and_blobs factored out of the main traverse function, > the next patch can introduce an in-order revision walking with ease. > > In the next patch we'll call `traverse_trees_and_blobs` from within the > loop walking the commits, such that we'll have one invocation of that > function per commit. That is why we do not want to have memory allocations > in that function, such as we'd have if we were to use a strbuf locally. > Pass a strbuf from traverse_commit_list into the blob and tree traversing > function as a scratch pad that only needs to be allocated once.
Makes sense.
I still don't think base_path is any clearer than base that was used in the original, though.