diff --git a/helix-vcs/src/git.rs b/helix-vcs/src/git.rs index 08121ad109cf..c1dd07197c1f 100644 --- a/helix-vcs/src/git.rs +++ b/helix-vcs/src/git.rs @@ -12,7 +12,7 @@ pub struct Git; impl DiffProvider for Git { fn get_file_head(&self, file: &Path) -> Option> { - debug_assert!(file.is_file()); + debug_assert!(!file.exists() || file.is_file()); debug_assert!(file.is_absolute()); // discover a repository, requires a directory so we call parent (should not fail but exit gracefully in that case)