Open projectgus opened 11 months ago
Hi Angus,
This might be the best-written bug report I've ever received. Should be a simple fix. Thank you!
Fixing this has the potential to cause other bugs, so targeting it for 1.8 so it can sit on master
for a while.
This is a pretty minor bug that I noticed but thought was worth reporting.
Steps to reproduce
magit-todos-update
to eithernil
(manual updates) or a number of seconds to cache.magit-todos-update
to scan for TODOs.rg
reports permission denied error for a file in the repo working directory).Expected behaviour
Afterwards, refreshing magit status will continue to not automatically scan for to-dos (as per the
magit-todos-update
selection).Observed behaviour
Afterwards, refreshing magit status will trigger a new scan each time, behaving as if
magit-todos-update
was set tot
.Analysis
magit-todos-updating
is set tot
before evaluatingmagit-todos--async-start-process
. It is only set tonil
again by thefinish-func
callback (and this only runs if the process succeeds.)magit-todos-updating
stayst
until/unless the scan process re-runs and succeeds. This causes the magit status callback to be treated as a manual update each time.