Remove git repos from worktree when deleted on storage
Co-Authored-By: Mikayla Maki <mikayla@zed.dev>
This commit is contained in:
parent
4251e0f5f1
commit
d2b18790a0
2 changed files with 50 additions and 20 deletions
|
@ -56,7 +56,7 @@ impl GitRepository {
|
|||
self.last_scan_id = scan_id;
|
||||
}
|
||||
|
||||
pub fn with_repo(&mut self, f: Box<dyn FnOnce(&mut git2::Repository)>) {
|
||||
pub fn with_repo<F: FnOnce(&mut git2::Repository)>(&mut self, f: F) {
|
||||
let mut git2 = self.libgit_repository.lock();
|
||||
f(&mut git2)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue