Problem
The Stop hook currently requires a pushed branch and an open PR even when the branch has zero commits ahead of main. This forces unnecessary empty commits and dummy PRs just to satisfy the hook.
Reproduction
- Create a branch from main with no code changes (e.g. a release-only task)
- Try to stop the session
- Hook fails with:
fatal: Needed a single revision (branch not pushed)
No pull request found for branch (no PR exists)
Expected behavior
The Stop hook should detect that the branch has no diff vs the base branch and skip the push/PR requirement — similar to how require-pr-before-stop already handles the no-changes case in #67.
Current workaround
Create an empty commit and a dummy PR to satisfy the hook.
Problem
The Stop hook currently requires a pushed branch and an open PR even when the branch has zero commits ahead of main. This forces unnecessary empty commits and dummy PRs just to satisfy the hook.
Reproduction
fatal: Needed a single revision(branch not pushed)No pull request found for branch(no PR exists)Expected behavior
The Stop hook should detect that the branch has no diff vs the base branch and skip the push/PR requirement — similar to how
require-pr-before-stopalready handles the no-changes case in #67.Current workaround
Create an empty commit and a dummy PR to satisfy the hook.