Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move git status out of Entry #22224

Merged
merged 39 commits into from
Jan 4, 2025
Merged
Changes from 1 commit
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
f0ad50b
Add a test covering the git_status API we want for
cole-miller Dec 11, 2024
7b5a1e3
Remove git statuses from the worktree entries,
mikayla-maki Dec 12, 2024
f7452b4
Get initial implementation of the new status checking code
mikayla-maki Dec 16, 2024
cf69b21
Work on git panel test some more
cole-miller Dec 16, 2024
52d8ebe
Get test passing, fix a couple of TODOs
cole-miller Dec 19, 2024
af9dcfe
Small cleanup around RepositoryWorkDirectory
cole-miller Dec 19, 2024
652cb93
Rename
cole-miller Dec 19, 2024
974c3e1
WIP: fix propogation
mikayla-maki Dec 17, 2024
f165119
WIP
cole-miller Dec 18, 2024
ff2a364
wat
cole-miller Dec 18, 2024
e8f3fc6
One test to go
mikayla-maki Dec 19, 2024
51c3016
Fix several bugs in how statuses are computed for multiple sub reposi…
mikayla-maki Dec 19, 2024
2f03726
Debugging
cole-miller Dec 19, 2024
cf68eab
Finish re-implementing status propagation
mikayla-maki Dec 19, 2024
ceaffa8
Roll out some of the git status changes through zed
mikayla-maki Dec 20, 2024
0d8b5e1
Merge branch 'main' into cole/git-panel
mikayla-maki Dec 20, 2024
942bedb
Push entry changes out further
cole-miller Dec 21, 2024
3ddd926
WIP: Switch to using a sumtree for repository entries
mikayla-maki Dec 21, 2024
d7eaa23
Finish shredding worktree, add the work directory data
mikayla-maki Dec 22, 2024
108a53a
Take a first pass at implementing the git status join
mikayla-maki Dec 22, 2024
2ff06ce
speculatively roll this out to API consumers
mikayla-maki Dec 22, 2024
62545e1
Merge remote-tracking branch 'origin/main' into cole/git-panel
cole-miller Dec 30, 2024
7c90ba2
Start fixing compiler errors
cole-miller Dec 30, 2024
92a19d9
More fixes
cole-miller Dec 30, 2024
e968a7c
Get nested repos traversal working
cole-miller Dec 31, 2024
7e54f0a
Upgrade GitTraversal to replace propagate_statuses; all tests passing
cole-miller Jan 1, 2025
7512230
Remove propagate_git_statuses
cole-miller Jan 2, 2025
adb5e66
Make WorkDirectory::repository_for_path faster
cole-miller Jan 2, 2025
69c6b79
Sync changed statuses to collab
cole-miller Jan 3, 2025
eba0917
Merge remote-tracking branch 'origin/main' into cole/git-panel
cole-miller Jan 3, 2025
c239065
Synchronize statuses over collab
cole-miller Jan 3, 2025
e457030
Clippy!
cole-miller Jan 3, 2025
ee98e52
Fix project panel not listening for git updates
cole-miller Jan 3, 2025
f6e79b5
Fix untracked statuses not propagating
cole-miller Jan 3, 2025
701954d
Re-add git statuses field because we can't drop it
cole-miller Jan 3, 2025
8c352ef
Fix ALL THE TYPOS
cole-miller Jan 3, 2025
f104fe7
Fix reused function name revealed by typo fix
cole-miller Jan 3, 2025
0bc71bf
Fix unused dependency
cole-miller Jan 4, 2025
ccfe55d
fix tests
mikayla-maki Jan 4, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
WIP: Switch to using a sumtree for repository entries
mikayla-maki committed Dec 21, 2024
commit 3ddd92632c9443a295f2c4cae5bb2d190b7e07f6
24 changes: 24 additions & 0 deletions crates/sum_tree/src/sum_tree.rs
Original file line number Diff line number Diff line change
@@ -761,6 +761,30 @@ impl<T: KeyedItem> SumTree<T> {
None
}
}

pub fn update<F, R>(
&mut self,
key: &T::Key,
cx: &<T::Summary as Summary>::Context,
f: F,
) -> Option<R>
where
F: FnOnce(&mut T) -> R,
{
let mut cursor = self.cursor::<T::Key>(cx);
let mut new_tree = cursor.slice(key, Bias::Left, cx);
let mut result = None;
if Ord::cmp(key, &cursor.end(cx)) == Ordering::Equal {
let mut updated = cursor.item().unwrap().clone();
result = Some(f(&mut updated));
new_tree.push(updated, cx);
cursor.next(cx);
}
new_tree.append(cursor.suffix(cx), cx);
drop(cursor);
*self = new_tree;
result
}
}

impl<T, S> Default for SumTree<T>
Loading