Max Brunsfeld and Nathan Sobo
55fcc586bc
Cancel outstanding fuzzy-matching calls before starting a new one
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-04-26 16:14:43 -07:00
Max Brunsfeld
733dc15c32
Ignore .git directories
2021-04-26 15:46:06 -07:00
Max Brunsfeld
e7c594262f
Fix handling of uppercase characters in fuzzy finding
2021-04-26 15:04:26 -07:00
Antonio Scandurra
111d98d6c1
Keep ignore status up-to-date as events are processed
2021-04-26 17:55:18 +02:00
Nathan Sobo
f770a70929
WIP: Maintain an IgnoreStack while scanning
...
All ignore files associated with ancestors of the directory currently being scanned are included in the stack. This allows us to compute ignore status for each entry as we initially scan it. If we encounter an ignored directory, we replace the stack with an "ignore all" variant that simply ignores every descendant of the ignored directory.
This is incomplete. We still need to construct an ignore stack in an appropriate state when rescanning subtrees in response to events. It also doesn't deal with individual ignore files being added, removed, or changed. I think we could potentially use the ignore stack while reconstructing the tree for this purpose.
2021-04-24 23:59:03 -06:00
Max Brunsfeld and Nathan Sobo
6a7308b87a
Avoid storing redundant copies of file paths
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-04-23 21:17:26 -07:00
Max Brunsfeld and Nathan Sobo
054203d21c
Fix fuzzy matching after removing root dirname from stored paths
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-04-23 15:22:47 -07:00
Nathan Sobo and Max Brunsfeld
dced9469f5
WIP
...
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com >
2021-04-23 12:47:23 -06:00
Nathan Sobo and Max Brunsfeld
c9d7249305
WIP
...
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com >
2021-04-23 11:37:23 -06:00
Antonio Scandurra
8f2fc079fd
Restructure Worktree to index entries by path
2021-04-23 15:25:59 +02:00
Antonio Scandurra
9723e46af4
Replace linear scan of entries with a custom FileIter
2021-04-22 17:29:36 +02:00
Antonio Scandurra
c429a937be
Remove is_ignored from PathEntry and lean more on the tree instead
2021-04-22 16:49:11 +02:00
Antonio Scandurra
af3bc236b7
Recompute ignore status when .gitignore changes or for new entries
2021-04-22 15:14:23 +02:00
Max Brunsfeld
499e55e950
Start work on handling changes to gitignore files
...
* Use the published ignore crate
* Store ignore objects on snapshot, and use them to compute
files' ignored status dynamically, instead of storing the
ignored status on the file.
2021-04-21 18:11:52 -07:00
Max Brunsfeld and Nathan Sobo
8e0ca2056e
Store paths as strings on PathMatch structs
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-04-21 12:05:34 -07:00
Antonio Scandurra and Max Brunsfeld
122926dcde
WIP: Associate entry names with directory children
...
Co-Authored-By: Max Brunsfeld <max@zed.dev >
2021-04-19 20:16:54 +02:00
Nathan Sobo
358fad8242
Replace the old worktree with the new one
2021-04-15 21:02:30 -06:00
Nathan Sobo
5648c67d54
Perform path matching on Worktree snapshots
...
We're going to need something that can be moved to a background thread. Worktree used to be easy to clone, but that's no longer really true. Instead we can take a snapshot.
2021-04-15 20:29:45 -06:00
Antonio Scandurra and Nathan Sobo
cefc753123
Re-introduce fuzzy-matching on the new WorkTree implementation
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-04-15 18:18:53 +02:00
Nathan Sobo and Antonio Scandurra
cbc1d83067
Get worktree out of the way so we can try again
...
Co-Authored-By: Antonio Scandurra <me@as-cii.com >
2021-04-14 11:09:06 -06:00
Nathan Sobo and Brooks Swinnerton
26f9127e83
Spawn worktree scanning on the scoped pool
...
Co-Authored-By: Brooks Swinnerton <934497+bswinnerton@users.noreply.github.com >
2021-04-13 20:09:45 -06:00
Nathan Sobo and Brooks Swinnerton
e4f41de7bf
Invert condition when opening entries
...
Co-Authored-By: Brooks Swinnerton <934497+bswinnerton@users.noreply.github.com >
2021-04-13 20:09:45 -06:00
Nathan Sobo
f3a0a11fc5
WIP
2021-04-13 20:09:45 -06:00
Nathan Sobo
bc34ff54fe
Add a failing test for detecting a file move
2021-04-13 20:09:45 -06:00
Nathan Sobo
41f50cdb61
Require a context when constructing a worktree
2021-04-13 20:09:45 -06:00
Nathan Sobo
24cdfd2471
Identify Worktree entries by their inode
...
This will allow us to re-parent elements when re-scanning when the file system changes.
2021-04-13 20:09:41 -06:00
Nathan Sobo
3c0bbe5eb5
Store root entry id
2021-04-13 20:07:42 -06:00
Nathan Sobo
cdfd61369e
Switch worktree entries to HashMap
2021-04-13 20:07:42 -06:00
Nathan Sobo
3803eb85a5
Inline clone
2021-04-13 20:07:42 -06:00
Nathan Sobo and Brooks Swinnerton
0cc5e8f742
Replace easy-parallel with scoped-pool for path searches
...
The easy-parallel crate spawned new threads on each call, which was resulting in way too many threads.
Co-Authored-By: Brooks Swinnerton <934497+bswinnerton@users.noreply.github.com >
2021-04-13 20:07:42 -06:00
Nathan Sobo and Brooks Swinnerton
0a2d2aa684
Replace app/app_mut on contexts with AsRef/AsMut impls
...
Co-Authored-By: Brooks Swinnerton <934497+bswinnerton@users.noreply.github.com >
2021-04-13 20:07:25 -06:00
Max Brunsfeld
a0da23799d
Merge branch 'master' into undo-stack
2021-04-12 10:49:46 -07:00
Antonio Scandurra
472ff1621f
Merge UndoHistory and History, storing also operations in the latter
2021-04-12 16:01:41 +02:00
Nathan Sobo
97a8a8ed43
Remove unsafe code from App::test_async
...
I don't actually think it was correct to allow the future to borrow a mutable app reference. I went back to passing a wrapper around the refcell to async tests. They'll be a bit more annoying to write but also totally safe.
2021-04-10 00:05:09 -06:00
Max Brunsfeld
079050541f
Get app running and test passing after gpui App+Platform restructure
2021-04-09 16:56:32 -07:00
Max Brunsfeld and Nathan Sobo
fda1394057
Rename Task -> EntityTask (a BackgroundTask is just a Task)
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-04-05 17:03:42 -07:00
Max Brunsfeld and Nathan Sobo
46f8665e41
Add save command
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-04-05 16:52:33 -07:00
Max Brunsfeld
fabc19402a
Resurrect commented-out worktree test
2021-04-05 09:12:19 -07:00
Max Brunsfeld
dd31b870c3
Remove small pieces of unused code
2021-04-02 14:26:53 -07:00
Nathan Sobo
e809d6119a
Return tasks from spawn and spawn_stream
...
Also, eliminate the background spawning methods. We can spawn futures
on the executor and then spawn those on the app if we need to wait for
the result of running one.
2021-03-18 20:10:32 -06:00
Nathan Sobo
f849857309
Handle command line arguments and populate worktree
2021-03-18 17:54:35 -06:00
Nathan Sobo
9bab29c72f
Get workspace module in and compiling
2021-03-18 15:52:46 -06:00
Nathan Sobo
171dd0c243
WIP
2021-03-18 13:17:25 -06:00
Nathan Sobo
23308e17a9
WIP on rebuilding with extracted UI framework
2021-03-18 13:13:31 -06:00