From: Junio C Hamano Date: Wed, 15 Oct 2008 21:22:43 GMT Subject: Re: [PATCH] Fix mkpath abuse in dwim_ref/sha1_name.c Message-ID: <7vabd5r1ss.fsf@gitster.siamese.dyndns.org> In-Reply-To: <20081015062039.GA3775@blimp.localdomain> 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()?