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

Re: [PATCH] read-tree -m -u: avoid getting confused by intermediate symlinks.

From
Junio C Hamano <junkio@cox.net>
Date
May 11, 2007, 17:10 UTC
Message-ID
<7vwszfb80y.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<81b0412b0705110708y7e3a9024p9e117e2da84ae916@mail.gmail.com>
"Alex Riesen" <raa.lkml@gmail.com> writes:
Show 10 quoted lines
> On 5/11/07, Junio C Hamano <junkio@cox.net> wrote:
>> @@ -268,6 +268,8 @@ static void unlink_entry(char *name)
>>  {
>>         char *cp, *prev;
>>
>> +       if (has_symlink_leading_path(name))
>> +               return;
>
> This can slow down the unlink case quiet considerably.
> Maybe the symlink paths can be cached?
Yes it can, and probably doable.

This is called once per each path that disappears from the result, relative to the current tree. The number of calls to this function is potentially quite large.

Previous: Alex RiesenNext: Junio C Hamano
Message 3 of 4 in “read-tree -m -u: avoid getting confused by intermediate symlinks.”
  1. read-tree -m -u: avoid getting confused by intermediate symlinks.Junio C Hamano, May 11, 2007
  2. Alex RiesenMay 11, 2007
  3. Junio C HamanoMay 11, 2007
  4. Junio C HamanoMay 11, 2007

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.