Skip to content

fix: exclude empty changes from statusline trunk count#27

Merged
muloka merged 1 commit intomainfrom
fix-statusline-empty-change-count
Mar 15, 2026
Merged

fix: exclude empty changes from statusline trunk count#27
muloka merged 1 commit intomainfrom
fix-statusline-empty-change-count

Conversation

@muloka
Copy link
Copy Markdown
Owner

@muloka muloka commented Mar 15, 2026

Summary

  • Empty @ change on top of trunk was incorrectly showing +1 instead of @trunk in the statusline
  • Changed revset from trunk()..@ to (trunk()..@) ~ empty() to skip empty changes
  • When all changes between trunk and @ are empty, now correctly shows @trunk

Test plan

  • Open a jj repo with an empty @ on trunk — statusline should show @trunk
  • Create a non-empty change on trunk — statusline should show +1
  • Create 2 non-empty changes + empty @ — statusline should show +2

🤖 Generated with Claude Code

Empty @ on top of trunk was showing +1 instead of @trunk.
Now uses (trunk()..@) ~ empty() to skip empty changes.
@muloka muloka merged commit 38534ed into main Mar 15, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant