From: Alex Riesen Date: Thu, 16 Oct 2008 06:21:12 GMT Subject: Re: [PATCH] Fix mkpath abuse in dwim_ref/sha1_name.c Message-ID: <81b0412b0810152321u508f1e2eqa7790baf476baf34@mail.gmail.com> In-Reply-To: <7vabd5r1ss.fsf@gitster.siamese.dyndns.org> 2008/10/15 Junio C Hamano : > Alex Riesen writes: > >> Junio C Hamano, Wed, Oct 15, 2008 01:17:52 +0200: >>> "Alex Riesen" writes: >>> > >>> > Otherwise the function sometimes fail to resolve obviously correct refnames, >>> > because the string data pointed to by "ref" argument were reused. >>> > >>> But your patch instead rewrites the computation of str2 by bypassing the >>> call to "another_function_that_uses_get_pathname()" and duplicating its >>> logic, which I do not think is a viable approach in the longer term. >> >> There is not enough logic to bypass there. It's just a dumb sprintf! > > But didn't you lose call to cleanup_path()? > In this case?