This commit is contained in:
Cole Miller 2025-07-31 12:55:21 -04:00
parent a9a23251b7
commit 09372534cd
7 changed files with 2 additions and 21 deletions

1
Cargo.lock generated
View file

@ -5936,7 +5936,6 @@ dependencies = [
"async-trait",
"cocoa 0.26.0",
"collections",
"dirs 4.0.0",
"fsevent",
"futures 0.3.31",
"git",

View file

@ -16,7 +16,6 @@ anyhow.workspace = true
async-tar.workspace = true
async-trait.workspace = true
collections.workspace = true
dirs.workspace = true
futures.workspace = true
git.workspace = true
gpui.workspace = true

View file

@ -131,7 +131,6 @@ pub trait Fs: Send + Sync {
Arc<dyn Watcher>,
);
// fn home_dir(&self) -> Option<PathBuf>;
fn open_repo(&self, abs_dot_git: &Path) -> Option<Arc<dyn GitRepository>>;
fn git_init(&self, abs_work_directory: &Path, fallback_branch_name: String) -> Result<()>;
fn is_fake(&self) -> bool;
@ -879,10 +878,6 @@ impl Fs for RealFs {
temp_dir.close()?;
case_sensitive
}
// fn home_dir(&self) -> Option<PathBuf> {
// Some(paths::home_dir().clone())
// }
}
#[cfg(not(any(target_os = "linux", target_os = "freebsd")))]
@ -917,7 +912,6 @@ struct FakeFsState {
read_dir_call_count: usize,
path_write_counts: std::collections::HashMap<PathBuf, usize>,
moves: std::collections::HashMap<u64, PathBuf>,
// home_dir: Option<PathBuf>,
}
#[cfg(any(test, feature = "test-support"))]
@ -1104,7 +1098,6 @@ impl FakeFs {
metadata_call_count: 0,
path_write_counts: Default::default(),
moves: Default::default(),
// home_dir: None,
})),
});
@ -2360,10 +2353,6 @@ impl Fs for FakeFs {
fn as_fake(&self) -> Arc<FakeFs> {
self.this.upgrade().unwrap()
}
// fn home_dir(&self) -> Option<PathBuf> {
// self.state.lock().home_dir.clone()
// }
}
fn chunks(rope: &Rope, line_ending: LineEnding) -> impl Iterator<Item = &str> {

View file

@ -517,6 +517,6 @@ pub fn global_gitignore_path() -> Option<PathBuf> {
pub fn global_gitignore_path() -> Option<PathBuf> {
static GLOBAL_GITIGNORE_PATH: OnceLock<Option<PathBuf>> = OnceLock::new();
GLOBAL_GITIGNORE_PATH
.get_or_init(|| ::ignore::gitignore::gitconfig_excludes_path())
.get_or_init(::ignore::gitignore::gitconfig_excludes_path)
.clone()
}

View file

@ -3,8 +3,6 @@ use std::{ffi::OsStr, path::Path, sync::Arc};
#[derive(Clone, Debug)]
pub struct IgnoreStack {
/// Rooted globs (like /foo or foo/bar) in the global core.excludesFile are matched against the nearest containing repository root,
/// so we
pub repo_root: Option<Arc<Path>>,
pub top: Arc<IgnoreStackEntry>,
}
@ -12,7 +10,6 @@ pub struct IgnoreStack {
#[derive(Debug)]
pub enum IgnoreStackEntry {
None,
/// core.excludesFile
Global {
ignore: Arc<Gitignore>,
},

View file

@ -4180,7 +4180,6 @@ impl BackgroundScanner {
let (prev_snapshot, ignore_stack, abs_path) = {
let mut state = self.state.lock();
state.snapshot.global_gitignore = ignore;
// FIXME is_dir (do we care?)
let abs_path = state.snapshot.abs_path().clone();
let ignore_stack =
state
@ -4803,7 +4802,6 @@ impl BackgroundScanner {
.strip_prefix(snapshot.abs_path.as_path())
.unwrap();
// FIXME understand the bug that causes .git to not have a snapshot entry here in the test
if let Ok(Some(metadata)) = smol::block_on(self.fs.metadata(&job.abs_path.join(*DOT_GIT)))
&& metadata.is_dir
{

View file

@ -2127,8 +2127,7 @@ async fn test_global_gitignore(executor: BackgroundExecutor, cx: &mut TestAppCon
);
});
// FIXME statuses are updated when .git added/removed
// Statuses are updated when .git added/removed
fs.remove_dir(
Path::new(path!("/home/zed/project/subrepo/.git")),
RemoveOptions {