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
Browse filesBrowse the repository at this point in the historyBrowse files
lpb-docs
committed
fix(lpb-config): status reported ahead as behind (swapped is-ancestor check)
cmd_status used 'merge-base --is-ancestor HEAD origin/<ref>': exit 0 means
local is BEHIND (or equal) but was reported 'up to date (or ahead)', while
local AHEAD fell into the 'behind remote' branch. Replace with
'rev-list --left-right --count' so status distinguishes up-to-date /
ahead / behind / diverged with exact counts.
Also use 'rev-parse --verify' for origin/<ref> in status/update/reset/merge:
plain rev-parse echoes the ref name to stdout on failure, producing a
fake remote head ('origin/main' string) that bypassed the empty guards.
Tests: status ahead/behind/up-to-date/diverged + missing-ref regression.
0 commit comments