Am 10.07.2017 um 04:10 schrieb Junio C Hamano:
Jeff King writes:
... And you could even drop origlen by
replacing it with "baselen - 3" at the end. But somehow doing the
computation on the fly actually seems more complicated to me (from the
perspective of a reader who is trying
Jeff King writes:
> ... And you could even drop origlen by
> replacing it with "baselen - 3" at the end. But somehow doing the
> computation on the fly actually seems more complicated to me (from the
> perspective of a reader who is trying to make sure all is correct).
True
On Sun, Jul 09, 2017 at 09:41:51AM -0700, Junio C Hamano wrote:
> > On the plus side, this moves an invariant out of the loop. On the minus
> > side, it has to introduce an extra variable for "length we add on to"
> > versus "dir length to pass to the subdir_cb". That's not rocket science,
> >
Jeff King writes:
> On Sat, Jul 08, 2017 at 10:59:06AM +0200, René Scharfe wrote:
>
>> Add the slash between loose object subdirectory and file name just once
>> outside the loop instead of overwriting it with each readdir call.
>> Redefine baselen as the length with that slash,
Am 09.07.2017 um 13:00 schrieb Jeff King:
On Sat, Jul 08, 2017 at 10:59:06AM +0200, René Scharfe wrote:
Add the slash between loose object subdirectory and file name just once
outside the loop instead of overwriting it with each readdir call.
Redefine baselen as the length with that slash, and
On Sat, Jul 08, 2017 at 10:59:06AM +0200, René Scharfe wrote:
> Add the slash between loose object subdirectory and file name just once
> outside the loop instead of overwriting it with each readdir call.
> Redefine baselen as the length with that slash, and add dirlen for the
> length without
Add the slash between loose object subdirectory and file name just once
outside the loop instead of overwriting it with each readdir call.
Redefine baselen as the length with that slash, and add dirlen for the
length without it. The result is slightly less wasteful and can use the
the cheaper
7 matches
Mail list logo