Fix unnecessary gitignore status updates due to failure to clear 'needs update' flag (#13471)

I found this bug while investigating
https://github.com/zed-industries/zed/issues/13176. When running zed
with `RUST_LOG=worktree=trace`, I realized we were updating all
gitignore statuses on every file change. This was due to a logic error
where we were marking a gitignore as up-to-date on a temporary *clone*
of our snapshot, but not in the `BackgroundScanner` itself.

Release Notes:

- Fixed a bug that caused unnecessary computations to happen on every
file-system event.
c6c5907693Max Brunsfeld committed on 6/24/2024, 5:39:08 PM· committed by GitHubparentdea928b
1 file changedLine totals unavailable