## Description
Refactored the `updateEntitiesInRepo` method to avoid mutating a
non-thread-safe `HashSet` (`filesInRepo`) inside a parallel stream. The
previous implementation added file paths to `filesInRepo` as a side
effect within a `.parallelStream()`, which could lead to race conditions
and data corruption. The new approach uses a pure mapping operation to
build the map and then derives the set of file paths, ensuring thread
safety and improving code clarity.
Fixes #`Issue Number`
_or_
Fixes `Issue URL`
> [!WARNING]
> _If no issue exists, please create an issue first, and check with the
maintainers if the issue is valid._
## Automation
/ok-to-test tags="@tag.All"
### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results -->
> [!IMPORTANT]
> 🟣🟣🟣 Your tests are running.
> Tests running at:
<https://github.com/appsmithorg/appsmith/actions/runs/15209038828>
> Commit: 3e3b28385cb1153c08f7ee7aa66e04cea58f665b
> Workflow: `PR Automation test suite`
> Tags: `@tag.All`
> Spec: ``
> <hr>Fri, 23 May 2025 11:19:05 UTC
<!-- end of auto-generated comment: Cypress test results -->
## Communication
Should the DevRel and Marketing teams inform users about this change?
- [ ] Yes
- [ ] No
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
- **Bug Fixes**
- Improved error recovery when saving updates to the Git repository,
ensuring changes are still applied even if an error occurs during the
update process.
- **Refactor**
- Enhanced the process for detecting and handling updated or deleted
files in the Git repository, leading to more reliable synchronization
and cleaner repository state.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->