git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] Fix mkpath abuse in dwim_ref/sha1_name.c

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 15, 2008, 21:22 UTC
Message-ID
<7vabd5r1ss.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<20081015062039.GA3775@blimp.localdomain>
Alex Riesen <raa.lkml@gmail.com> writes:
Show 11 quoted lines
> Junio C Hamano, Wed, Oct 15, 2008 01:17:52 +0200:
>> "Alex Riesen" <raa.lkml@gmail.com> 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()?
Previous: Alex RiesenNext: Alex Riesen
Message 4 of 5 in “Fix mkpath abuse in dwim_ref/sha1_name.c”
  1. Fix mkpath abuse in dwim_ref/sha1_name.cAlex Riesen, Oct 14, 2008
  2. Junio C HamanoOct 14, 2008
  3. Alex RiesenOct 15, 2008
  4. Junio C HamanoOct 15, 2008
  5. Alex RiesenOct 16, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.