Touched up comments
This commit is contained in:
parent
a1299d9b68
commit
8c24c858c9
1 changed files with 2 additions and 11 deletions
|
@ -119,12 +119,6 @@ impl std::fmt::Debug for GitRepositoryEntry {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// impl Clone for GitRepositoryEntry {
|
|
||||||
// fn clone(&self) -> Self {
|
|
||||||
// GitRepositoryEntry { repo: self.repo.boxed_clone(), scan_id: self.scan_id }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
pub struct LocalSnapshot {
|
pub struct LocalSnapshot {
|
||||||
abs_path: Arc<Path>,
|
abs_path: Arc<Path>,
|
||||||
ignores_by_parent_abs_path: HashMap<Arc<Path>, (Arc<Gitignore>, usize)>,
|
ignores_by_parent_abs_path: HashMap<Arc<Path>, (Arc<Gitignore>, usize)>,
|
||||||
|
@ -1723,17 +1717,14 @@ impl LocalSnapshot {
|
||||||
&self.git_repositories
|
&self.git_repositories
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Worktree root
|
|
||||||
// |
|
|
||||||
// git_dir_path: c/d/.git
|
|
||||||
//in_dot_git Query: c/d/.git/HEAD
|
|
||||||
// Manages Query: c/d/e/f/a.txt
|
|
||||||
|
|
||||||
impl GitRepositoryEntry {
|
impl GitRepositoryEntry {
|
||||||
|
// Note that these paths should be relative to the worktree root.
|
||||||
pub(crate) fn manages(&self, path: &Path) -> bool {
|
pub(crate) fn manages(&self, path: &Path) -> bool {
|
||||||
path.starts_with(self.content_path.as_ref())
|
path.starts_with(self.content_path.as_ref())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Note that theis path should be relative to the worktree root.
|
||||||
pub(crate) fn in_dot_git(&self, path: &Path) -> bool {
|
pub(crate) fn in_dot_git(&self, path: &Path) -> bool {
|
||||||
path.starts_with(self.git_dir_path.as_ref())
|
path.starts_with(self.git_dir_path.as_ref())
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue