Skip to content

Commit

Permalink
adapt to changes in git-worktree
Browse files Browse the repository at this point in the history
  • Loading branch information
Byron committed Dec 29, 2022
1 parent d7ee622 commit 5a97bb5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions git-repository/src/worktree/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,12 +120,12 @@ pub mod excludes {
/// Configure a file-system cache checking if files below the repository are excluded.
///
/// This takes into consideration all the usual repository configuration.
// TODO: test
pub fn excludes<'a>(
// TODO: test, provide higher-level interface that is much easier to use and doesn't panic.
pub fn excludes(
&self,
index: &'a git_index::State,
index: &git_index::State,
overrides: Option<git_attributes::MatchGroup<git_attributes::Ignore>>,
) -> Result<git_worktree::fs::Cache<'a>, Error> {
) -> Result<git_worktree::fs::Cache, Error> {
let repo = self.parent;
let case = repo
.config
Expand Down
2 changes: 1 addition & 1 deletion tests/tools/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ impl Drop for GitDaemon {
}

static SCRIPT_IDENTITY: Lazy<Mutex<BTreeMap<PathBuf, u32>>> = Lazy::new(|| Mutex::new(BTreeMap::new()));
static EXCLUDE_LUT: Lazy<Mutex<Option<git_worktree::fs::Cache<'static>>>> = Lazy::new(|| {
static EXCLUDE_LUT: Lazy<Mutex<Option<git_worktree::fs::Cache>>> = Lazy::new(|| {
let cache = (|| {
let (repo_path, _) = git_discover::upwards(Path::new(".")).ok()?;
let (git_dir, work_tree) = repo_path.into_repository_and_work_tree_directories();
Expand Down

0 comments on commit 5a97bb5

Please sign in to comment.