zed/crates/worktree/Cargo.toml
Max Brunsfeld 4129fc87d8
Fix the filtering of index.lock + COMMIT_MESSAGE FS events to work in linked worktrees (#57763)
Zed reloads a lot of data about a git repository any time any file
changes inside of the `.git` directory, with the exception of a few
known paths that we know do not warrant a reload, such as `index.lock`
and `COMMIT_MESSAGE`. Previously, we ignored FS events for those files,
but we used a specific path that only worked for the main worktree. This
caused a lot of unnecessary reloads when using linked worktrees. Now we
ignore those files in a general way, by their filename, so that the
optimization applies to linked worktrees as well.

@cole-miller Noticed this bug.

Release Notes:

- Fixed unnecessary reloading of Git state that could occur when editing
in linked worktrees.
2026-05-27 00:04:30 +00:00

76 lines
1.9 KiB
TOML

[package]
name = "worktree"
version = "0.1.0"
edition.workspace = true
publish.workspace = true
license = "GPL-3.0-or-later"
[lib]
path = "src/worktree.rs"
doctest = false
test = false
[[test]]
name = "integration"
required-features = ["test-support"]
path = "tests/integration/worktree_tests.rs"
[lints]
workspace = true
[features]
test-support = [
"gpui/test-support",
"language/test-support",
"pretty_assertions",
"settings/test-support",
"text/test-support",
"util/test-support",
]
[dependencies]
anyhow.workspace = true
async-channel.workspace = true
async-lock.workspace = true
chardetng.workspace = true
clock.workspace = true
collections.workspace = true
encoding_rs.workspace = true
fs.workspace = true
futures.workspace = true
fuzzy.workspace = true
git.workspace = true
gpui.workspace = true
ignore.workspace = true
language.workspace = true
log.workspace = true
parking_lot.workspace = true
paths.workspace = true
postage.workspace = true
pretty_assertions = { workspace = true, optional = true }
rpc = { workspace = true, features = ["gpui"] }
serde.workspace = true
serde_json.workspace = true
settings.workspace = true
smallvec.workspace = true
sum_tree.workspace = true
text.workspace = true
tracing.workspace = true
util.workspace = true
ztracing.workspace = true
[dev-dependencies]
clock = { workspace = true, features = ["test-support"] }
collections = { workspace = true, features = ["test-support"] }
gpui = { workspace = true, features = ["test-support"] }
paths = { workspace = true, features = ["test-support"] }
rand.workspace = true
rpc = { workspace = true, features = ["test-support"] }
settings = { workspace = true, features = ["test-support"] }
util = { workspace = true, features = ["test-support"] }
worktree = { workspace = true, features = ["test-support"] }
zlog.workspace = true
[package.metadata.cargo-machete]
ignored = ["tracing"]