status/finish: alarm when the local default branch is ahead of origin #224
Labels
No labels
breaking
bug
documentation
enhancement
epic
good first issue
help wanted
refactoring
resolution/duplicate
resolution/invalid
resolution/wontfix
security
severity/critical
severity/high
severity/low
severity/medium
status/abandoned
status/blocked
status/needs-decision
status/needs-info
status/needs-verification
testing
upstream
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
sixfold-space/madtea#224
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Detection layer for the recoverable-guard tier (#222): damage that arrives by any route (raw git, another tool, a confused process) shows up as the local default branch being AHEAD of its origin counterpart - in a branch-and-merge flow, nothing should land there directly. madt_status already computes the ahead count; during the incident it dutifully reported "ahead 1" and nothing treated it as an alarm.
Behavior:
Pinned warning text (counts and branch names dynamic):
"warning: local 'main' is 2 commit(s) AHEAD of origin/main - in a branch-and-merge flow nothing should land on the local default branch directly. Inspect with: git log origin/main..main. If the commits are wanted, move them to a branch and finish normally; if not, your own shell can reset main back to origin."
Note the last clause deliberately points at the user's own shell for the reset - madtea does not carry a ref-rewind operation and must not name one.
Acceptance criteria:
Depends on #222.