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
Alex Riesen <raa.lkml@gmail.com>
Date
Oct 16, 2008, 06:21 UTC
Message-ID
<81b0412b0810152321u508f1e2eqa7790baf476baf34@mail.gmail.com>
In-Reply-To
<7vabd5r1ss.fsf@gitster.siamese.dyndns.org>
2008/10/15 Junio C Hamano <gitster@pobox.com>:
Show 16 quoted lines
> Alex Riesen <raa.lkml@gmail.com> writes:
>
>> 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()?
>
In this case?
Previous: Junio C Hamano
Message 5 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.