From 6c856fca136dc9fd95a5ed6eec4c85ebd196612c Mon Sep 17 00:00:00 2001 From: Victor Mota Date: Thu, 19 Feb 2026 10:37:31 -0500 Subject: [PATCH 1/2] feat: add --pull-default flag to workspace start 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/par#23 --- README.md | 21 +++- par/cli.py | 30 ++++-- par/operations.py | 120 ++++++++++++++++++----- par/test_workspace.py | 220 ++++++++++++++++++++++++++++++++++++++++++ par/workspace.py | 58 ++++++++--- pyproject.toml | 2 +- 6 files changed, 404 insertions(+), 47 deletions(-) create mode 100644 par/test_workspace.py diff --git a/README.md b/README.md index a43ef8a..d97d6ea 100644 --- a/README.md +++ b/README.md @@ -60,6 +60,7 @@ par control-center # View ALL sessions and workspaces globally with separ ```bash par workspace start feature-auth --repos frontend,backend +par workspace start feature-auth --repos frontend,backend --pull-default # Pull default branch first par workspace code feature-auth # Open in VSCode with multi-repo support par workspace open feature-auth # Attach to unified tmux session ``` @@ -325,7 +326,7 @@ par workspace cursor feature-auth # Cursor **Create a workspace:** ```bash -par workspace start