From: Chris Torek Date: Fri, 05 Jun 2026 16:57:30 GMT Subject: Re: [PATCH] worktree: record creation time and free-form note Message-ID: In-Reply-To: On Fri, Jun 5, 2026 at 8:31 AM Phillip Wood wrote: > Isn't "what is the worktree for" a property of the branch that's checked > out, not the worktree itself? I don't think it is. A lot of things within Git have, shall way say, "less than optimal" names, with "branch" (with at least three different meanings), "HEAD", and "index" being examples of this. (This is just an observation, not a complaint: we know from studies that oddities in names don't matter that much after a bit of usage of some system. They're just minor stumbling blocks when getting started.) Work-tree or working tree is not one of them, though. It's concise and pointed: a working tree is where you do work. As such, the *purpose* of a working tree is exactly as general as the purpose of doing work! That's a wide-open set. Git's internal constraint, of requiring each working tree that is using a branch name to have a unique-to-that-tree branch name, is a property specific to branch names, not to branching in general (an example of the ambiguity of "branch" here). And of course, as you note, any working tree can be on a detached HEAD. Exactly what properties any given working tree should have, and the weird entanglement Git has between the "primary" working tree (the one created by any non-bare clone) and all "secondary" working trees, is a mere (ahem) matter of implementation. Descriptions, creation times, modification times, etc., are all potentially useful. I think, had Git initially made all repositories effectively bare, with separate working trees added later, this might all be a little clearer, but of course that ship sailed, crossed *all* the oceans, sank, was refloated and refitted, and sailed for another decade already. :-) Chris