Re: [PATCH] worktree: record creation time and free-form note
- From
- Kristoffer Haugsbakk <kristofferhaugsbakk@fastmail.com>
- Date
- Jun 5, 2026, 16:50 UTC
- Message-ID
- <563fd8eb-187e-489b-af15-1551697b8849@app.fastmail.com>
- In-Reply-To
- <b1b15a47-0842-4a26-9a95-bfdae12799e0@gmail.com>
On Fri, Jun 5, 2026, at 17:17, Phillip Wood wrote:
Show 10 quoted lines
>>[snip] >> Add per-worktree metadata so users can answer "what is this worktree >> for, and when did I make it?" without resorting to external notes. > > A couple of thoughts related to this > > Isn't "what is the worktree for" a property of the branch that's checked > out, not the worktree itself? We already have > branch.<branch>.description to add a descritpion to a branch. If you > have a detached HEAD it is trickier though.
Some worktrees that I have that are not about one branch:
• For building and deploying the code • For spelunking old versions • For testing building the code/app with all untracked files deleted (“cleanroom”) to compare with my own setup or my coworkers when the regular working trees get apparently gummed up • (for Git) with leak checker • (for Git) with breaking changes (when testing git-whatchanged(1) I think?)
I would also like to (some time) set up a worktree or multiple of them to run tests on each commit.
***
If I would feel like needing a note about these worktrees and it wasn’t supported by git(1)? I guess I would use a per-worktree ref. That would even feel more “Git” than an administrative file, but I guess there are technical reasons for why they are not used for these things.
>[snip]