You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(publish): own-repo base remote + stash the dirty target tree (#83)
Two publish preconditions were unmet on a normal own-repo cycle, so it failed
until the operator did manual git surgery (hit contributing into Wyrd).
1. Hardcoded `upstream` remote. The new-PR path branched off a remote literally
named `upstream` (`fetch upstream`, `checkout -B … upstream/<base>`). A fork has
upstream=canonical / origin=fork, but contribution_model=own-repo (#75) has only
origin, so publish died on the fetch. Now `[publisher].base_remote` (default
upstream; rendered `origin` for own-repo, `upstream` for fork) drives both, and
_check_repo requires only the remotes the path actually uses (base + push), so
own-repo needs no second remote. The stack path requires only the brief's remote.
2. Clean-tree requirement vs. Do/Check dirtying it. publish re-applies the fix from
patch.diff onto a fresh branch (it doesn't use the working tree), but `checkout -B`
+ the old _check_repo clean-guard aborted on a dirty tree — and Do edits the target
in place + repo-scoped gates run against the working tree, so the tree is always
dirty at publish, with nothing reverting it. publish now STASHES the tree (incl.
untracked) before checkout/apply and RESTORES it after / on failure (both the
new-PR and stack paths), so edit-in-place and a clean publish checkout coexist.
Tests: base_remote configurable (own-repo branches off origin, no upstream assumed);
a real-git publish over a DIRTY checkout succeeds and restores the operator's edits +
untracked file on the original branch, with the fix branch pushed. Suite green (145).
Closes#83.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Eduard Ralph <15236434+eduralph@users.noreply.github.com>
0 commit comments