zed/crates/buffer_diff/src
Anthony Eid 8c8639ffcc
git: Fix buffer diff crash that could occur during the stage all operation (#47265)
Closes https://github.com/zed-industries/zed/issues/46519

This crash happened because we were incorrectly merging pending and
unstaged hunks together by always using the pending hunk end offset as
the merged hunk bound instead of the max of both hunks.

The fix is to use `max()` when updating `buffer_offset_range.end` during
pending hunk merging, matching the behavior used for unstaged hunk
merging.

Release Notes:

- N/A
2026-01-21 06:37:33 +00:00
..
buffer_diff.rs git: Fix buffer diff crash that could occur during the stage all operation (#47265) 2026-01-21 06:37:33 +00:00