Do not show diffs for files with \r\n contents (#11519)

This commit is contained in:
Kirill Bulatov 2024-05-08 00:37:09 +03:00 committed by GitHub
parent 6a64b732b6
commit 3d9f0087ff
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 56 additions and 33 deletions

View file

@ -1069,7 +1069,7 @@ impl LocalWorktree {
&self,
path: &Path,
cx: &mut ModelContext<Worktree>,
) -> Task<Result<(File, String, Option<Rope>)>> {
) -> Task<Result<(File, String, Option<String>)>> {
let path = Arc::from(path);
let abs_path = self.absolutize(&path);
let fs = self.fs.clone();
@ -1100,7 +1100,7 @@ impl LocalWorktree {
if abs_path_metadata.is_dir || abs_path_metadata.is_symlink {
None
} else {
git_repo.lock().load_index_text(&repo_path).map(Rope::from)
git_repo.lock().load_index_text(&repo_path)
}
}
}));