Kirill Bulatov
616bda85e9
Fix the tests
2023-11-17 21:40:57 +02:00
Kirill Bulatov
2759ed4d00
An attempt to ignore git regularly
2023-11-17 21:40:57 +02:00
Kirill Bulatov
8180938401
Fix most of the TODOs
2023-11-17 21:40:57 +02:00
Kirill Bulatov
6028cd90d4
Retract back to original scanning strategy
...
Do not descend into ignored directories, to avoid tracking their state.
2023-11-17 21:40:57 +02:00
Kirill Bulatov
906db58188
Defer ignored dirs scanning
2023-11-17 21:40:57 +02:00
Kirill Bulatov
30fefa0ef8
Use a better name
2023-11-17 21:40:57 +02:00
Kirill Bulatov
d3ce82e82c
Fix the new test
2023-11-17 21:40:57 +02:00
Kirill Bulatov
ce2cfc6035
Fix the ! bug, better test draft
2023-11-17 21:40:57 +02:00
Kirill Bulatov
26f7e66b49
Add default scan excluded files settings
2023-11-17 21:40:56 +02:00
Kirill Bulatov
9373d38434
Rescan worktree on scan exclusions settings change
2023-11-17 21:40:56 +02:00
Kirill Bulatov
1612c90052
More lenient file path matchers
2023-11-17 21:40:56 +02:00
Kirill Bulatov
b8be720490
Fix the bugs
2023-11-17 21:40:56 +02:00
Kirill Bulatov
126e4cce8f
Scan all ignored files by default now
2023-11-17 21:40:56 +02:00
Kirill Bulatov
401f85bed2
Properly ignore elements from configured exceptions
2023-11-17 21:40:56 +02:00
Kirill Bulatov
9072e5a507
Properly set ignore stacks and is_ignored values
2023-11-17 21:40:56 +02:00
Kirill Bulatov
7d97dfa6be
Test and filter data draft
2023-11-17 21:40:56 +02:00
Max Brunsfeld
0bed5e4562
Port buffer reload bug fixes back to gpui1 crates
2023-11-16 16:03:14 -08:00
Kirill Bulatov
888098bad2
More detailed errors when opening files
2023-11-15 16:20:00 +02:00
Kirill Bulatov
fd6f6cc9f8
Return proper full paths for single file workspaces
2023-10-30 22:33:44 +02:00
Piotr Osiewicz
31241f48be
workspace: Do not scan for .gitignore files if a .git directory is encountered along the way ( #3135 )
...
Partially fixes zed-industries/community#575
This PR will see one more fix to the case I've spotted while working on
this: namely, if a project has several nested repositories, e.g for a
structure:
/a
/a/.git/
/a/.gitignore
/a/b/
/a/b/.git/
/a/b/.gitignore
/b/ should not account for a's .gitignore at all - which is sort of
similar to the fix in commit #c416fbb, but for the paths in the project.
The release note is kinda bad, I'll try to reword it too.
- [ ] Improve release note.
- [x] Address the same bug for project files.
Release Notes:
- Fixed .gitignore files beyond the first .git directory being respected
by the worktree (zed-industries/community#575 ).
2023-10-17 18:56:03 +02:00
Max Brunsfeld
17925ed563
Remove unnecessary dependencies on client and rpc
2023-10-06 13:14:53 -07:00
Max Brunsfeld
46429426ef
Avoid accidental gpui transitive dependency in collab
...
* Make Fs depend on Text, not vise versa
Co-authored-by: Joseph <joseph@zed.dev>
Co-authored-by: Mikayla <mikayla@zed.dev>
2023-08-30 13:16:01 -07:00
Max Brunsfeld
f798be6e27
Fix rust 1.72 warnings about shadowed glob re-exports
2023-08-25 10:25:21 -07:00
Max Brunsfeld
404f76739c
Format let-else statements
2023-08-25 10:11:32 -07:00
Max Brunsfeld
a127b0d3e6
Fix warnings surfaced in Rust 1.71
2023-08-02 09:19:23 -07:00
Max Brunsfeld
6c09782aa2
Optimize full file status via passing in known file mtime
2023-07-22 11:53:26 -07:00
Max Brunsfeld
51d311affd
Compute unstaged git status separately, to take advantage of our cached file mtimes
2023-07-21 17:58:43 -07:00
Max Brunsfeld
ff0864026e
Only fetch statuses for changed paths
2023-07-21 17:08:31 -07:00
Max Brunsfeld
05b161118c
Don't call git status when ignored files change
2023-07-21 17:05:42 -07:00
Max Brunsfeld
4bd415f2b6
Retrieve git statuses in one batch when scanning dirs
2023-07-21 13:50:54 -07:00
Max Brunsfeld
b9e0074793
Perform only one git statuses call when reloading a git repo after it changes
2023-07-14 14:29:22 -07:00
Max Brunsfeld
2e2333107a
Find the layer with the smallest enclosing node in language_scope_at
2023-07-14 09:11:56 -07:00
Max Brunsfeld
f83514cde4
Fix regression in handling git FS events ( #2670 )
...
As part of an optimization in
https://github.com/zed-industries/zed/pull/2663 , I changed the way that
the worktree ignores FS events within unloaded directories. But this
accidentally prevented us from detecting some events that occur inside
of `.git` directories.
In this PR, I've made further tweaks to which FS events we can ignore.
We now explicitly opt *in* to scanning `.git` (shallowly) directories
(even though they are ignored). Note that we still don't recursively
scan the git directory (including all of the files inside `objects`
etc). This seems like the correct amount of work to do, and from my
testing (and our unit tests that use the real FS and real git
repositories), it seems to work correctly.
Release Notes:
- Fixed a bug where Zed would not detect some git repository changes
(preview only).
2023-06-30 11:40:49 -07:00
Max Brunsfeld
92df76e632
Fix accidental ignoring of git FS events
2023-06-30 11:20:50 -07:00
Mikayla Maki
3d6e063a6d
Fix method header
2023-06-29 23:53:57 -07:00
Mikayla Maki
d22a576f5e
fix failing test
2023-06-29 23:50:24 -07:00
Mikayla Maki
a6dabf7acf
Make path updates minimal
2023-06-29 18:15:40 -07:00
Mikayla Maki
33f5248d4f
Add the ability to make new directories by adding slashes to a file name
2023-06-29 17:35:22 -07:00
Max Brunsfeld
922d8f30d6
Tweak debug log message when ignoring fs events
2023-06-29 12:01:59 -07:00
Max Brunsfeld
8609ccdcf7
Add test coverage for FS events happening inside unloaded dirs
2023-06-29 11:55:25 -07:00
Max Brunsfeld
ba80c53278
Avoid redundant FS scans when LSPs changed watched files
...
* Don't scan directories if they were already loaded.
* Do less work when FS events occur inside unloaded directories.
2023-06-29 11:35:49 -07:00
Max Brunsfeld
91f87bb31f
Scan any external/ignored directories needed for LSP watchers
...
Also, don't include "external" files in project searches. Treat them
the same as ignored files.
Co-authored-by: Nathan Sobo <nathan@zed.dev>
2023-06-23 12:53:25 -07:00
Max Brunsfeld
27b74e9ea1
Prune the set of expanded dir ids as entries are removed
2023-06-23 10:23:21 -07:00
Max Brunsfeld
b22a18345e
Emit loaded events for lazily loaded paths in worktree
2023-06-23 09:39:37 -07:00
Max Brunsfeld
ffb0a215ea
Fix randomized worktree test failures
...
* Distinguish between unloaded and pending directories via separate entry kind.
* Scan directories before updating ignore statuses after fs events.
2023-06-22 16:52:04 -07:00
Max Brunsfeld
5350164db9
Get integration test passing. Wait for expand entry on remote projects.
2023-06-22 10:34:28 -07:00
Max Brunsfeld
400e3cda32
Scan directories when they stop being ignored
2023-06-22 10:34:28 -07:00
Max Brunsfeld
d3477f75ac
Fix reloading of git repositories
...
Also, clean up logic for reloading git repositories.
2023-06-22 10:34:28 -07:00
Max Brunsfeld
4424dafcd7
Fix expansion of ancestor directories when refreshing a path
2023-06-22 10:34:28 -07:00
Max Brunsfeld
3e6aedfc69
Expand dirs on-demand when opening buffers inside unloaded dirs
2023-06-22 10:34:28 -07:00