mirror of
https://github.com/pbakaus/impeccable.git
synced 2026-09-17 00:26:41 +03:00
Remote defaults lead with their own rev, like upstreams already do
Round seven: a remote-advertised default candidate tried the local branch first, so a stale local main outranked the fresher origin/main the symref points at and refilled changedFiles with the divergence. The candidate now leads with the advertised remote rev, mirroring the upstream candidate's reasoning. Failing-first test: local main forced two commits behind the remote default, feature delta stays clean. Prepared with AI assistance (Claude Code), directed by @pbakaus. Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Code
parent
a470fc777a
commit
e2c1c43ee7
@@ -169,7 +169,10 @@ function gitSignals(cwd) {
|
||||
// main; an existing develop therefore outranks the remote default. This
|
||||
// is #302's own repro shape, and repos without develop are unaffected.
|
||||
addCandidate('develop', revsFor('develop'));
|
||||
for (const head of remoteHeads) addCandidate(head.name, revsFor(head.name));
|
||||
// A remote's advertised default prefers its own remote-tracking rev over
|
||||
// a possibly stale local checkout of the same name, for the same reason
|
||||
// the upstream candidate leads with its rev.
|
||||
for (const head of remoteHeads) addCandidate(head.name, [...new Set([head.rev, ...revsFor(head.name)])]);
|
||||
for (const name of ['main', 'master']) addCandidate(name, revsFor(name));
|
||||
for (const c of candidates) {
|
||||
const rev = c.revs.find((r) => run(['rev-parse', '--verify', '--quiet', r]) !== null);
|
||||
|
||||
Reference in New Issue
Block a user