Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add config option for listing worktrees for bare repositories #143

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

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

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