feat: add --pull-default flag to par start and workspace start#26
Open
userhas404d wants to merge 4 commits into
Open
feat: add --pull-default flag to par start and workspace start#26userhas404d wants to merge 4 commits into
userhas404d wants to merge 4 commits into
Conversation
Add an opt-in --pull-default flag to 'par workspace start' that automatically pulls each repository's default branch (via origin/HEAD) before creating workspace branches. This ensures workspace branches are always based on up-to-date upstream code. Behavior when --pull-default is passed: 1. Determine each repo's default branch via origin/HEAD 2. Checkout that branch in each repo 3. Run git pull --ff-only to update it 4. Create workspace branches from the updated default branch The flag is opt-in and preserves existing behavior when not provided. Closes coplane#23
feat: add --pull-default flag to workspace start
Add --pull-default to single-repo 'par start' command, mirroring the existing workspace behavior. When set, the default branch is detected via origin/HEAD, pulled with --ff-only, and used as the base for the new worktree branch. An explicit --base still takes precedence. - Add pull_default param to core.start_session() - Add --pull-default CLI flag to start/create commands - Add 4 new tests covering CLI forwarding and core behavior - Update README with single-repo --pull-default docs
feat: add --pull-default flag to par start
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #23
Adds
--pull-defaultsupport to bothpar start(single-repo) andpar workspace start(multi-repo) commands.When
--pull-defaultis used, the default branch for each repository is detected viaorigin/HEAD, pulled with--ff-only, and used as the base for new worktree branches. An explicit--basestill takes precedence.Changes
Single-repo
par start --pull-defaultpull_default: boolparameter tocore.start_session()--pull-defaultCLI flag tostart/createcommandsMulti-repo
par workspace start --pull-default(existing)README
Usage
Testing
All 48 tests pass, including 4 new tests:
test_cli_start_forwards_pull_defaulttest_cli_start_pull_default_off_by_defaulttest_start_session_pull_default_uses_default_branch_as_basetest_start_session_pull_default_with_explicit_base