cmp: quiet mode compares full file sizes before applying -n
Maintainers usually reply within 1 day
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 78/100
Research direction
Start at the cmp command entry point and reproduce the reported cases with -s and -n using the shell commands in the issue. Trace how quiet mode compares file sizes versus the byte limit; done means the one-byte case exits 0 like GNU diffutils while the two-byte case still exits 1.
Written by the indexing model from the issue text.
Description
cmp -s compares the full file sizes before applying the byte limit. Two files of different sizes therefore compare unequal even when every requested byte matches.
printf a > a
printf ab > ab
/usr/bin/cmp -s -n 1 a ab; echo "GNU=$?"
diffutils cmp -s -n 1 a ab; echo "uutils=$?"
GNU diffutils 3.12 exits 0; uutils exits 1. With -n 2, both exit 1 because the shorter file ends inside the requested range.
- Dominant language
- Rust
- Stars
- 276
- Forks
- 43
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 8
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from uutils/diffutils
-
diff: `-y --tabsize=<huge>` overflows the column arithmetic (overflow-checks only)Possibly taken @sami-daniel claimed this 55 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Maintainers usually reply within 1 day
-
diff panics on an oversized inline context count (`-c`/`-u`/`-C`/`-U`): parse overflow and capacity overflowPossibly taken @MsfPablo claimed this 51 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
uutils/diffutils#245 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
sdiff: fix the layout of unchanged rows, blank lines and cut tabsPossibly taken @sami-daniel claimed this 1 day ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 28/100
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
Maintainers usually reply within 1 day
All issues in uutils/diffutils
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 95/100
Maintainers usually reply within 1 day
-
Markdown Preview Fonts Don't Show Selected OptionPossibly taken @RadhiRasho claimed this today. Openstate:needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 61/100
zed-industries/zed#65300 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day