Skip to content

Conversation

@SwannHERRERA
Copy link

The idea of this is coming from this comment on issue#116

Basically it's a new config boolean enable_list_worktrees, and when it's set to true the list of repos contain both the "normal repos", the bare repo and each worktrees of the bare repo, those will open a single window session.

@jrmoulton
Copy link
Owner

I'm still a bit confused on what this is changing.

@SwannHERRERA
Copy link
Author

Yes sorry I will give a better explanation :

When working with bare repositories, the current behavior is to list all repositories in the directory view. When opening a bare repository, it opens multiple X-windows - one for each worktree in the repository. While this behavior might be suitable for some workflows, it can be disruptive in certain organizational contexts.

This PR introduces a new configuration flag list-worktree that can be enabled using:
tms config --enable-list-worktree true

Default Behavior (flag disabled)

  • Lists all repositories, including bare repositories
  • Opening a bare repository launches multiple X-windows (one per worktree)

New Behavior (flag enabled)

  • Instead of listing bare repositories directly, shows individual worktrees
  • Worktrees are displayed in the format: repository_name#worktree_name
  • Example listing :
repoxxx#master
repoxxx#branch-a
repoxxx#branch-b
  • Selecting a worktree opens a single X-window for that specific worktree

@jrmoulton
Copy link
Owner

sorry for the late reply. I think this is a great feature to add. This needs to be rebased on top of latest main with the cleaned up error handling but then this is good to go

@SwannHERRERA
Copy link
Author

Closing this PR. The most recent advancements on this topic can be found in :

#166

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants