pull-all: report unpushed commits on the current branch, not up to date #288

Open
allod-agent wants to merge 1 commit from agent/pull-all-unpushed into master
Member

Owner summary

What changes: pull-all no longer reports a checkout whose current branch is ahead of its upstream as "up to date". Any branch — master included, in default mode — now prints unpushed [on <branch> — N unpushed commits] and skips the pull, the state side branches under --switch already got.

What stays identical: clean repos pull exactly as before; dirty, host-provided and no-upstream handling are untouched; --switch still switches clean side branches to the default.

What proves it: tests/workspace/pull-all.sh, 41/41 passing on this VM, including new cases for an ahead default branch and an ahead side branch in both modes, each asserting the pull never runs.

If it is wrong: say so and the PR gets reverted; the old reporting returns verbatim.

Residual risk: R1 — one script, caller-level mock tests, straight-revert rollback.

One behavior worth knowing: a diverged branch (ahead and behind) now skips with a count of both sides instead of attempting a merge; the count is the same symmetric difference the old --switch path printed, and the skip names itself.

Closes allod/tools#287.

## Owner summary What changes: `pull-all` no longer reports a checkout whose current branch is ahead of its upstream as "up to date". Any branch — `master` included, in default mode — now prints `unpushed [on <branch> — N unpushed commits]` and skips the pull, the state side branches under `--switch` already got. What stays identical: clean repos pull exactly as before; dirty, host-provided and no-upstream handling are untouched; `--switch` still switches clean side branches to the default. What proves it: `tests/workspace/pull-all.sh`, 41/41 passing on this VM, including new cases for an ahead default branch and an ahead side branch in both modes, each asserting the pull never runs. If it is wrong: say so and the PR gets reverted; the old reporting returns verbatim. Residual risk: R1 — one script, caller-level mock tests, straight-revert rollback. One behavior worth knowing: a diverged branch (ahead and behind) now skips with a count of both sides instead of attempting a merge; the count is the same symmetric difference the old `--switch` path printed, and the skip names itself. Closes allod/tools#287.
A branch ahead of its upstream pulled as a no-op and read 'up to date',
hiding stale default branches until the next patch relay conflicted.
Report 'unpushed [on <branch> — N commits]' and skip, on any branch;
the duplicated check inside --switch collapses into the shared one.

Closes allod/tools#287
This pull request doesn't have enough approvals yet. 0 of 1 approvals granted.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin agent/pull-all-unpushed:agent/pull-all-unpushed
git switch agent/pull-all-unpushed
Sign in to join this conversation.
No description provided.