Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

sdiff: fix the layout of unchanged rows, blank lines and cut tabs

オープン
#300 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@sami-daniel がすでに取り組んでいます。

2026年10月6日 から。

  • #301 @sami-daniel による — オープン

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
28/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
停滞
技術スタック
rust
領域
cli

調査の方向性

Work is already claimed by open PR 301. The issue names src/side_diff.rs and confines the change to process_half_line and push_output: print each half’s text, keep the column where output stopped, and pad from that column to the marker and to column two. Compare against GNU diff -y with --width and --expand-tabs using the given L/R examples; done when unchanged rows, blank lines, and cut tabs match GNU layout.

索引モデルが issue の本文から書いたものです。

説明

src/side_diff.rs pads the left half up to a fixed column and writes the right half after it, instead of padding from the column where the text ended. Three rows come out different from GNU diff:

  • The right half of an unchanged row starts at half_width + 3 instead of column two. The two are the same at the default --width=130, so it only shows at other widths and with --expand-tabs.
  • A blank line common to both files is padded up to column two instead of left empty.
  • A tab that reaches the end of the half is dropped, and the text after it is still printed. GNU diff cuts the row at that tab.

Tabs are shown as ^I and line ends as $:

$ diff -y --width=40 L R | cat -A      # L: a,(blank),b,c   R: a,(blank),c
a^I^I   a$
^I^I   $
b^I^I   <$
c^I^I   c$

$ diff -y --width=10 L R | cat -A      # L: a<TAB>b,c   R: c
ab  <$
c    c$

GNU diff 3.10 prints:

a^I^I^Ia$
$
b^I^I   <$
c^I^I^Ic$

a   <$
c^Ic$

So the change is confined to process_half_line and push_output. Print only the text of each half, keep the column where the output stopped, and pad from that column to the marker and to column two.

主要言語
Rust
スター
276
フォーク
44
平均マージ
1日 23時間
マージ済み PR(30日)
8

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

uutils/diffutils のほかの issue

uutils/diffutils の issue をすべて見る

似ている issue

Rust の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。