sdiff: implement the `|` marker for changed lines
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 76/100
Hướng nghiên cứu
Start in src/side_diff.rs and trace how the current engine diff’s Left, Right, and Both results are consumed. Verify the change with the provided diff -y example, including a hunk with unequal deletion and insertion counts. Done means positional pairs in each contiguous change hunk print with |, while leftovers retain < or > and unchanged lines remain unaffected.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
src/side_diff.rs currently emits only <, > and blank gutters. Lines that exist in both files but differ are printed as a separate deletion and insertion instead of a single row with |.
The | is produced at print time, by pairing positionally inside a contiguous change hunk. For a run of N deletions and M insertions, the first min(N, M) are printed as pairs with |, and the leftovers keep < or >. The pairing is positional, so the two lines of a | row need nothing in common:
$ diff -y --width=40 L R # L: a,b1,b2,b3,c R: a,X,c
a a
b1 | X
b2 <
b3 <
c c
So the change is confined to the consumption of the current engine diff's. Buffer the run of Left/Right results, and on the next Both (or at EOF) flush it with the pairing above.
- Ngôn ngữ chính
- Rust
- Star
- 276
- Fork
- 39
- Merge trung bình
- 3 giờ 27 phút
- Pull request đã merge (30 ngày)
- 3
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của uutils/diffutils
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 64/100
Tất cả issue của uutils/diffutils
Issue tương tự
-
risk:low runtime status:in-progress type:test
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 92/100
zeroclaw-labs/zeroclaw#11023 ·
-
good first issue refactor
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
EricSpencer00/Resilient#4835 · 1 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
bisq-network/bisq-musig#204 ·
-
agent:ready documentation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
cesarferreira/stax#890 ·