worktree: status command
if you have active worktrees for applied branches, they should show up in the but status command
❯ but status
╭┄00 [Unassigned Changes]
┊
┊╭┄t6 [user-bookmarks]
┊● f381269 my commit in my main workdir
┊.
┊├┄nd [wt/user-bookmarks2] {worktree}
┊┊ (.git/gitbutler/worktrees/user-bookmarks2)
┊● 81269f3 worktree change v2
┊.
┊├┄p3 [wt/user-bookmarks1] {worktree}
┊┊ (.git/gitbutler/worktrees/user-bookmarks1)
┊● 427019e worktree change ex1
├╯
┊
● 204e309 (common base) [origin/main] Merge pull request #10 from schacon/sc-description
It should be clear that they're associated, but not currently applied here. If files are modified in those directories, they show up as assigned to that worktree.
I will be making the worktree information discoverable in our workspace data structure, which then trickles through to the CLI that way. In theory, this makes it usable by the GUI too one day. Note that my implementation will be general without using additional GitButler specific metadata, at least at first.
With #11123 there is a basis for bring worktree support closer to the vision presented here.
For now, it looks like this:
It's not meant to satisfy this issue, but a basis for further experimentation, the data is there to do anything really.