Re: [PATCHv2] submodule: Port resolve_relative_url from shell to C
I forgot to send out the draft last year.
On Thu, Dec 17, 2015 at 10:55 AM, Johannes Sixt <j6t@kdbg.org> wrote:
Show 5 quoted lines
>> That's about 3%.
>
> I appreciate this effort as it should help us on Windows. Although the
> numbers (and my own timings) suggest that this is only a small step
> forward. That's not surprising as the patch removes only two forks.
ok. Probably the timings are not as important here anyways.
Show 6 quoted lines
>
> As to the implementation, find a patch below that removes the ifdefs
> and a few other suggestions. It is a mechanical conversion without
> understanding what relative_url() does. I have the gut feeling that the
> two strbuf_addf towards the end of the function can be contracted and
> the temporarily allocate copy in 'out' can be removed.
I have the gut feeling, too. But I could not quite write down the solution.
>
> If there were a few examples in the comment above the function, it
> would be much simpler to understand.
I agree. So rewording the comment in the next reroll.