Repository navigation
perf(sessions): skip git status in the session-start hook - #1845
Merged
Merged
Conversation
The hook stores no dirty flag, but place_of ran git status anyway. A Dirty switch lets the hook skip the call; the sessions view still reads it. Signed-off-by: igorjs <2278164+igorjs@users.noreply.github.com>
Signed-off-by: igorjs <2278164+igorjs@users.noreply.github.com>
igorjs
marked this pull request as ready for review
November 15, 2026 07:37
igorjs
enabled auto-merge
November 15, 2026 07:39
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The session-start hook asked
place_offor the place of the working directory, which rangit status --porcelainfor a dirty flag the hook never stores.place_attakes aDirtyswitch and the hook passesSkip;place_ofstill reads it for the sessions view. Follow-up from #1832. Refs #536Notes for reviewers
Follow-ups from #1800 and #1832 not done here:
ghruns before the local merged check: an open PR overrides a branch git calls merged (named_branch_landedreturns false for Open first), so asking git first would change the verdict of the real sweep too. That is a behaviour decision, not a small fix.hooks.mdrows put the write in bothsession-activityandsession-clean-exit, and either can be installed alone. Dropping one is a wiring change.reopenflag instore::touch: style only, no behaviour or risk, left alone.