Skip to content

Commit

Permalink
fix crash when creating new file
Browse files Browse the repository at this point in the history
  • Loading branch information
pascalkuthe committed Sep 20, 2022
1 parent bd7287b commit ec3f033
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion helix-vcs/src/git.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ pub struct Git;

impl DiffProvider for Git {
fn get_file_head(&self, file: &Path) -> Option<Vec<u8>> {
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)
Expand Down

0 comments on commit ec3f033

Please sign in to comment.