Files
zed/crates
Cole Miller 134275b0ae Avoid unnecessary git scan when the agent creates a checkpoint (#61271)
Agent checkpointing is implemented by staging selected files to a
temporary git index file, then creating a commit. To avoid checkpointing
commonly-excluded files even when the user doesn't have them in their
gitignore, we write a temporary override to .git/info/exclude while
running the staging. However, this causes us to do an unnecessary git
scan when a checkpoint happens, because in general we want to do this
when `.git/info/exclude` changes (the user might have edited it).

This PR fixes that by doing the staging in two steps:
- First, we stage any tracked files
- Then we get a list of untracked files to include and stage those
explicitly. The list is obtained by running `git ls-files` with a custom
ignore file in addition to the `--standard` ignores; we write that
custom ignore file to a path ending in `tmp` under .git, which means
that our worktree code will not start a git scan in response to its
events (the same way it already works for the temporary index file).
.git/info/exclude is never touched. Note that we already listed all
untracked files before this PR, in order to exclude the large ones.

Release Notes:
- Fixed Zed doing unnecessary work when the agent created a checkpoint.
2026-07-27 00:55:39 +00:00
..
2026-07-24 19:56:07 +00:00
2026-07-24 19:56:07 +00:00
2026-04-29 10:27:47 +00:00
2026-05-04 06:30:47 +00:00
2026-07-21 07:58:16 +00:00
…
2026-05-27 10:31:53 +00:00
2026-04-29 10:27:47 +00:00
2026-05-27 10:31:53 +00:00
2026-06-09 22:46:22 +00:00
2025-11-07 11:36:05 +00:00
2026-05-27 10:31:53 +00:00