Repository navigation
feat: --publish pushes stack branches that have no upstream yet - #23
Merged
Merged
Conversation
-p used to skip branches with no upstream without a word, so a half-pushed stack looked pushed. It now names them, and --publish pushes them with git push -u to the remote their nearest pushed parent uses (else remote.pushDefault, origin, or the only remote; never the root's remote, which in a fork is the original repo). Also makes the merge-commit test deterministic: integration was equidistant from a and b.
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.
wt sync -ponly pushes branches that already have an upstream, and until now it skipped the rest silently. With a stack like osc1717 -> {editor-line -> copy-line, hunk-nav, watch-pos} where only osc1717 had been pushed, the output listed one push and nothing else, so it was easy to think the whole stack went up.Now
-p(and-n,--push-only) says which branches it left local, e.g. "Not pushing editor-line, copy-line: they have no upstream yet. Publish them withwt sync --publish."--publishis the opt-in to push them. It implies--push(or combines with--push-only) and pushes each new branch withgit push -u, no force, to the remote its nearest pushed parent uses. If nothing under it is pushed, it falls back toremote.pushDefault, thenorigin, then the only remote. The root branch is deliberately not consulted: in a forkmainusually tracks the original repo, and new branches shouldn't land there.While running the suite I also hit a flaky test: in
branch_with_merge_commits_is_not_flattened, integration was equally close to a and b, and the tie could go either way. a now has two commits so it's the clear parent.