git: Revert "Ignore whitespace in git blame invocation" (#44648)

Reverts zed-industries/zed#35960
cc @cole-miller

---------

Co-authored-by: Cole Miller <cole@zed.dev>
This commit is contained in:
Piotr Osiewicz
2025-12-12 14:28:25 +01:00
committed by GitHub
co-authored by Cole Miller
parent 18d344e118
commit 47c30b6da7
6 changed files with 50 additions and 29 deletions
+19
View File
@@ -3387,6 +3387,25 @@ impl LineEnding {
}
}
pub fn chunks_with_line_ending(rope: &Rope, line_ending: LineEnding) -> impl Iterator<Item = &str> {
rope.chunks().flat_map(move |chunk| {
let mut newline = false;
let end_with_newline = chunk.ends_with('\n').then_some(line_ending.as_str());
chunk
.lines()
.flat_map(move |line| {
let ending = if newline {
Some(line_ending.as_str())
} else {
None
};
newline = true;
ending.into_iter().chain([line])
})
.chain(end_with_newline)
})
}
#[cfg(debug_assertions)]
pub mod debug {
use super::*;