Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@snowbillr
Copy link

@snowbillr snowbillr commented Oct 6, 2025

Addresses #39

Introduce a new configuration model to support per-repository setup commands and file copying during worktree creation. Update tests and documentation to reflect these changes.

Example new config setting:

[[repository_settings]]
# Path or pattern for the repository (absolute or glob)
repository = "~/src/myproject"
# List of files or globs to copy from the repo root to the new worktree
copy_files = ["templates/.env.example"]
# List of setup commands to run in the new worktree directory
setup_commands = ["npm install"]

Flow updates in green:

flowchart LR
    A[User runs gwq worktree add] --> B[Manager.Add]
    B --> C[Create worktree directory]
    C --> D[Determine repository path]
    D --> E{Match repository_settings in config?}
    E -- No --> F[Worktree ready]
    E -- Yes --> G[Copy files]
    G --> H[Run setup commands]
    H --> I[Worktree ready]

    %% Highlight new functionality
    style D fill:#D5E8D4,stroke:#82B366,stroke-width:2px
    style E fill:#D5E8D4,stroke:#82B366,stroke-width:2px
    style G fill:#D5E8D4,stroke:#82B366,stroke-width:2px
    style H fill:#D5E8D4,stroke:#82B366,stroke-width:2px
Loading

@snowbillr snowbillr marked this pull request as draft October 6, 2025 17:46
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.

1 participant