Re: [PATCH 5/5] sparse-index: improve lstat caching of sparse paths
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jun 25, 2024, 00:08 UTC
- Message-ID
- <xmqqtthhanpy.fsf@gitster.g>
- In-Reply-To
- <CABPp-BFgg8DOy-SUUsXLyfsWr0DOUUc1vQKnPpihy-h+NAj_zg@mail.gmail.com>
Elijah Newren <newren@gmail.com> writes:
Show 6 quoted lines
> ... It'd simplify this particular call to > > strbuf_add(&data->dir, rest, next_slash - rest + 1); > > or substitute any other variable name for "rest" there. Maybe it > shouldn't be a big deal, but ...
Good observation. Naming is hard, but it often happens that a temporary variable that is given an appropriate name improves the readability of the code a lot.
> Anyway, despite the many small comments I made, well done! I think > the method is not only much more performant, but more readable than my > original. With a few small tweaks, it should be good to merge.
Yup, and your review was a delight to read.
Thanks, both.