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

Re: [PATCH 0/2] drop specialized knowledge from generic worktree code

From
Junio C Hamano <gitster@pobox.com>
Date
Jun 22, 2020, 17:34 UTC
Message-ID
<xmqq7dvzdmy2.fsf@gitster.c.googlers.com>
In-Reply-To
<20200619233544.42025-1-sunshine@sunshineco.com>
Eric Sunshine <sunshine@sunshineco.com> writes:
Show 11 quoted lines
> This patch series removes specialized knowledge from the libified
> worktree code about how front-end "git worktree list" wants worktrees
> sorted, and instead makes it the responsibility of "git worktree list"
> itself to do the sorting.
>
> It is built atop es/worktree-duplicate-paths since that series adds
> another caller of get_worktrees() which this series touches.
>
> A possible argument against this patch series is that some other entity
> may someday want worktrees sorted in the same fashion as "git worktree
> list", however, that seems a case of YAGNI.

Is anything hurting to have the "mostly extra" flag and its handling that is added only to support "worktree list"? That would be another possible argument against this clean-up.

Having said that, I think this is good.
Thanks.  Will queue.
Previous: Eric Sunshine
Message 4 of 4 in “drop specialized knowledge from generic worktree code”
  1. 0/2 drop specialized knowledge from generic worktree codeEric Sunshine, Jun 19, 2020
  2. 1/2 worktree: drop get_worktrees() special-purpose sorting optionEric Sunshine, Jun 19, 2020
  3. 2/2 worktree: drop get_worktrees() unused 'flags' argumentEric Sunshine, Jun 19, 2020
  4. Junio C HamanoJun 22, 2020

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.