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

Re: [PATCH] [GSOC] prune_worktrees(): reimplement with dir_iterator

From
Junio C Hamano <gitster@pobox.com>
Date
Apr 1, 2017, 02:29 UTC
Message-ID
<xmqqlgrkx3l5.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<1491009687-10419-1-git-send-email-robert.stanca7@gmail.com>
Robert Stanca <robert.stanca7@gmail.com> writes:
> Replaces recursive traversing of opendir with dir_iterator

The original code for this one, and also the other one, is not recursive traversing. This one enumerates all the _direct_ subdirectories of ".git/worktrees", and feeds them to prune_worktree() without recursing. The other one scans all the files _directly_ underneath ".git/objects/pack" to find the ones that begin with the packtmp prefix, and unlinks them without recursing. Neither of them touches anything in subdirectory of ".git/worktrees/" nor ".git/objects/pack/".

Using dir_iterator() to make it recursive is not just overkill but is a positively wrong change, isn't it?

Previous: Robert StancaNext: Robert Stanca
Message 2 of 4 in “[GSOC] prune_worktrees(): reimplement with dir_iterator”
  1. [GSOC] prune_worktrees(): reimplement with dir_iteratorRobert Stanca, Apr 1, 2017
  2. Junio C HamanoApr 1, 2017
  3. Robert StancaApr 1, 2017
  4. Junio C HamanoApr 1, 2017

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.