ZIm/crates/git/src
Max Brunsfeld 8f942bf647
Use repository mutex more sparingly. Don't hold it while running git status. (#12489)
Previously, each git `Repository` object was held inside of a mutex.
This was needed because libgit2's Repository object is (as one would
expect) not thread safe. But now, the two longest-running git operations
that Zed performs, (`status` and `blame`) do not use libgit2 - they
invoke the `git` executable. For these operations, it's not necessary to
hold a lock on the repository.

In this PR, I've moved our mutex usage so that it only wraps the libgit2
calls, not our `git` subprocess spawns. The main user-facing impact of
this is that the UI is much more responsive when initially opening a
project with a very large git repository (e.g. `chromium`, `webkit`,
`linux`).

Release Notes:

- Improved Zed's responsiveness when initially opening a project
containing a very large git repository.
2024-05-30 09:37:11 -07:00
..
blame.rs Compute git statuses using the bundled git executable, not libgit2 (#12444) 2024-05-29 14:31:24 -07:00
commit.rs git: Do not log error if repository has no commits (#11163) 2024-04-29 16:00:29 +02:00
diff.rs Introduce DisplayRow, MultiBufferRow newtypes and BufferRow type alias (#11656) 2024-05-11 00:06:51 +03:00
git.rs Compute git statuses using the bundled git executable, not libgit2 (#12444) 2024-05-29 14:31:24 -07:00
hosting_provider.rs Extract http from util (#11680) 2024-05-10 15:50:20 -06:00
repository.rs Use repository mutex more sparingly. Don't hold it while running git status. (#12489) 2024-05-30 09:37:11 -07:00
status.rs Compute git statuses using the bundled git executable, not libgit2 (#12444) 2024-05-29 14:31:24 -07:00