fix(push): create the remote bookmark on first push of a new branch #184

Merged
gmackie merged 1 commit from fix/push-allow-new into main 2026-08-02 21:44:13 +00:00
Owner

What

forge push now creates the remote bookmark on the first push of a new branch (item #4 of the forge-CLI DX field report).

Why

It shelled out to jj git push without --allow-new, so a fresh branch failed with "Refusing to create new remote bookmark. Nothing changed." — breaking the documented changeset -> push -> pr flow on new branches.

Change

The jj push path adds --allow-new (unless the caller already passed it), via a pure jjPushArgs helper (unit-tested). Ryu/git paths unchanged. (jj deprecation-warns the flag but it still works; a brand-new local bookmark can't be pre-tracked.)

Verification

Go build/vet green; TestJJPushArgs 2/2.

Field report: item #4.

## What `forge push` now creates the remote bookmark on the first push of a new branch (item #4 of the forge-CLI DX field report). ## Why It shelled out to `jj git push` without `--allow-new`, so a fresh branch failed with *"Refusing to create new remote bookmark. Nothing changed."* — breaking the documented changeset -> push -> pr flow on new branches. ## Change The jj push path adds `--allow-new` (unless the caller already passed it), via a pure `jjPushArgs` helper (unit-tested). Ryu/git paths unchanged. (jj deprecation-warns the flag but it still works; a brand-new local bookmark can't be pre-tracked.) ## Verification Go `build`/`vet` green; `TestJJPushArgs` 2/2. Field report: item #4.
fix(push): create the remote bookmark on first push of a new branch
All checks were successful
CI / gitleaks (pull_request) Successful in 16s
forgegraph/ci CI passed
CI / ci (pull_request) Successful in 6m21s
13b6fef539
`forge push` built `jj git push` without --allow-new, so the first push of a
fresh branch failed with 'Refusing to create new remote bookmark. Nothing
changed.' and the changeset -> push -> pr flow dead-ended. It now adds
--allow-new for the jj path (unless the caller already passed it).
gmackie deleted branch fix/push-allow-new 2026-08-02 21:44:13 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
gmackie/ForgeGraph!184
No description provided.