Repository navigation
feat(rebase): update other local branches with --update-refs - #155
Merged
Merged
Conversation
This was referenced Oct 19, 2026
Remember the choice per repo as local rebase.updateRefs. The flat interactive sequence editor overwrites git's todo, so Strand emits update-ref lines after the last kept commit each branch contained. Preserve-merges passes git's own lines through. Git older than 2.38 disables the toggle instead of failing mid-rebase. DAN-88 Co-authored-by: Daniels <danielss-dev@users.noreply.github.com>
…N-88) - Remember the toggle in Strand's own local key strand.rebaseUpdateRefs instead of git's rebase.updateRefs, which also changed git pull --rebase and terminal rebases. Every Strand rebase still passes --update-refs / --no-update-refs explicitly. - Save the choice when a rebase starts, not on every checkbox click. - Restore the editor's no-op check: an unchanged all-pick plan no longer runs a do-nothing rebase just because branches sit in the range. - Tests: flat interactive path (Strand-written update-ref lines) paused on a conflict, then aborted (all tips restored) or continued (the stacked branch moves); the Strand key leaves rebase.updateRefs unset. - Correct the doc comment and learning about reorders. Co-authored-by: Daniels <danielss-dev@users.noreply.github.com>
danielss-dev
marked this pull request as ready for review
October 19, 2026 14:46
danielss-dev
force-pushed
the
developements/update-refs-rebase-c6bf
branch
from
October 19, 2026 14:46
20abe5b to
13ea268
Compare
danielss-dev
added a commit
that referenced
this pull request
Oct 19, 2026
danielss-dev
added a commit
that referenced
this pull request
Oct 19, 2026
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
First slice of DAN-88. Later slices (parent branch, sidebar grouping, restack indicator, stacked PRs) are not in this change.
Plain rebase and the interactive rebase editor can move other local branches whose tips sit in the rewritten range. The choice is remembered per repository as local
rebase.updateRefs. The flag on a given call (--update-refsor--no-update-refs) wins over that setting. Git older than 2.38 disables the toggle, with a tooltip, instead of failing mid-rebase.The plan shows which other local branches will move, and which will not because they are checked out in another worktree. The result toast lists the branches that actually moved. Refs move only when the rebase finishes. A conflict pause and Abort leave every ref where it was.
On the flat path the sequence editor is
cat "$STRAND_REBASE_PLAN" >, which overwrites git's todo and would drop git'supdate-reflines. Strand emitsupdate-ref refs/heads/<name>itself, after the last kept commit that branch contained — after that step's reword amend and after a following squash or fixup chain. A dropped tip falls back to the previous kept ancestor, or to the rebase base when nothing it contained survives. Reordering does not adopt commits the branch never contained.The preserve-merges awk editor prints unknown lines through, including
update-refand abbreviatedu. That path passes--update-refsand does not emit a second copy.Test plan
cargo test -p strand-core— plain rebase on and off, interactive reword on and off, drop/squash/reorder landing, worktree skip, conflict then abort then continue, preserve-merges passthroughcargo testfor strand-ops, strand-headless, strand-tauri, and strand-azdocargo clippy -p strand-core -p strand-tauri -p strand-ops -p strand-headless -p strand-azdo-protocol -p strand-azdo -- -D warningspnpm --filter ./ui test— toggle markup andplanUpdateRefsReview fixes
strand.rebaseUpdateRefs, not git'srebase.updateRefs.git pull --rebaseand terminal rebases are no longer affected. Every Strand rebase still passes--update-refs/--no-update-refsexplicitly.git pull --rebaseshould respect the user's ownrebase.updateRefssetting. Strand doesn't pass or override it for pull (git pulldoesn't accept--no-update-refsanyway), and since Strand no longer writesrebase.updateRefs, that setting is only ever the user's. No code change.isNoop).plan_update_refsdoc comment and the learning about reorders are corrected.rebase.updateRefsunset.Merge order 157 → 153 → 155 → 154 → 156 → 158: #154, #156 and #158 build on the signatures here and will need adapting after this merges.