Merge branch 'main' into kvark-linux

This commit is contained in:
Mikayla 2024-02-07 11:49:49 -08:00
commit 67555ee5b4
No known key found for this signature in database
238 changed files with 6624 additions and 3524 deletions

View file

@ -9,11 +9,11 @@ license = "GPL-3.0-or-later"
path = "src/fs.rs"
[dependencies]
collections = { path = "../collections" }
rope = { path = "../rope" }
text = { path = "../text" }
util = { path = "../util" }
sum_tree = { path = "../sum_tree" }
collections.workspace = true
rope.workspace = true
text.workspace = true
util.workspace = true
sum_tree.workspace = true
anyhow.workspace = true
async-trait.workspace = true
@ -31,16 +31,16 @@ log.workspace = true
libc = "0.2"
time.workspace = true
gpui = { path = "../gpui", optional = true}
gpui = { workspace = true, optional = true}
[target.'cfg(target_os = "macos")'.dependencies]
fsevent = { path = "../fsevent" }
fsevent.workspace = true
[target.'cfg(not(target_os = "macos"))'.dependencies]
notify = "6.1.1"
[dev-dependencies]
gpui = { path = "../gpui", features = ["test-support"] }
gpui = { workspace = true, features = ["test-support"] }
[features]
test-support = ["gpui/test-support"]

View file

@ -5,14 +5,12 @@ use parking_lot::Mutex;
use serde_derive::{Deserialize, Serialize};
use std::{
cmp::Ordering,
ffi::OsStr,
os::unix::prelude::OsStrExt,
path::{Component, Path, PathBuf},
sync::Arc,
time::SystemTime,
};
use sum_tree::{MapSeekTarget, TreeMap};
use util::ResultExt;
use util::{paths::PathExt, ResultExt};
pub use git2::Repository as LibGitRepository;
@ -119,7 +117,7 @@ impl GitRepository for LibGitRepository {
if let Some(statuses) = self.statuses(Some(&mut options)).log_err() {
for status in statuses.iter() {
let path = RepoPath(PathBuf::from(OsStr::from_bytes(status.path_bytes())));
let path = RepoPath(PathBuf::try_from_bytes(status.path_bytes()).unwrap());
let status = status.status();
if !status.contains(git2::Status::IGNORED) {
if let Some(status) = read_status(status) {