This is most directly visible in tests like https://github.com/gitbutlerapp/gitbutler/blob/master/crates/but-hunk-dependency/src/ranges/tests/path.rs#L139 , where a 7-line hunk was split by an overlapping hunk from a child commit, but the line_shift values weren't recalculated (as far as I can tell, they should be 3 and 3 instead of 7 and 7). When used to shift other stacks when combining path ranges in combine_path_ranges in crates/but-hunk-dependency/src/ranges/mod.rs, this results in incorrect results.
I've created a PR #11368 that demonstrates this issue.