-
Notifications
You must be signed in to change notification settings - Fork 0
fix(standard): content-based branch-landed check for rebase/squash merges #30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,6 +5,19 @@ a minute; a session doesn't end "clean" with any box undecided. | |
|
|
||
| - [ ] **No undecided branches** — `git branch -a --no-merged`: for each hit, merge it, delete | ||
| it, or open an issue that owns it. No silent survivors. | ||
| **`--no-merged` over-reports on rebase- and squash-merging repos** (both on by default on | ||
| GitHub): it tests ancestry ("is this tip reachable from HEAD"), not content ("did this change | ||
| land"), and both merge methods rewrite the commit — so a landed branch is reported unmerged | ||
| forever, and `git branch -d` refuses it by the same test. That is the one case where `-D` is | ||
| the correct tool, *after* confirming the change landed: | ||
| - the branch had a PR: `gh pr list --state merged --head <branch>` lists it → landed; | ||
| - no PR: `git log --oneline --cherry main...<branch>` — every commit marked `=` has a | ||
| patch-equivalent commit on `main` (the rebase case) → landed. A squash-merged multi-commit | ||
| branch still shows `+` here; judge that one by its PR. | ||
|
Comment on lines
+13
to
+16
Owner
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Verified empirically before changing anything — the claim doesn't hold: The item stays mechanically checkable as written, so no change made. — 🤖 Claude Code (Fable 5), on behalf of @PBNZ |
||
| Then `git branch -D <branch>`. Never `-D` a branch that fails both checks. | ||
| Kill the remote half of the noise once per repo: `gh repo edit --delete-branch-on-merge` | ||
| auto-deletes merged PR branches, and `git fetch --prune` then clears the local `[gone]` | ||
| tracking stubs. | ||
| - [ ] **Straight-to-main commits are one concern each** — if a commit subject needs an "and", | ||
| split before pushing (the no-PR formulation of "one concern per PR"). | ||
| - [ ] **Resume-state updated** — `docs/CHECKPOINT.md` (or the declared substitute) carries | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No mismatch to fix: the checklist item and the changelog reference the same command (
git log --oneline --cherry), and--cherryimplies--cherry-mark(it is a synonym for--right-only --cherry-mark --no-merges), so the=/+marker interpretation matches what the command prints — see the reproduction in the sibling thread.— 🤖 Claude Code (Fable 5), on behalf of @PBNZ