You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
TUI: stop the scan when the user quits before it finishes #7
runScreen in tui.go starts sweep.Scan in a goroutine, and Scan has no way to be cancelled. If the user quits while the scan is still running, it keeps walking the disk and forking git until the process exits.
Usually the process exits straight away, so this is harmless. It matters when the user quits while deletions are still running: sweep waits for them ("Finishing deletions…"), and the scan keeps using CPU and disk for that whole time with nobody reading its results.
Idea
Give Scan a context.Context (or a stop flag on Progress) that find, the vetting workers and measure check, and cancel it when the screen quits. The non-interactive path can pass a context that is never cancelled.
Low priority: nothing leaks, since everything ends with the process.
Activity
Ask git once per repo, cut hard-link memory, stop the scan on quit, c…