Red Hat Bugzilla – Bug 1012075
diff -Z hangs
Last modified: 2013-11-10 02:49:26 EST
Description of problem:
I was trying to compare two files with mixed-mode line endings, and assumed that 'diff -Z' would ignore the trailing carriage returns and thus give me a sane diff.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. $ diff -Z <(printf 'a\nb\n') <(printf 'a\nb\n'); echo $?
2. $ timeout 10s diff -Z <(printf 'a\r\nb\n') <(printf 'a\nb\r\n'); echo $?
step 1 completes almost instantly, printing 0. Step 2 runs 10 seconds, then prints 124 because it timed out.
both steps should complete almost instantly, with status 0.
A self-compiled build from upstream's 3.3 tarball does NOT suffer this problem, so it appears that it may be a bug in a downstream-only patch. But I didn't investigate further than that.
I've just hit this too, simpler reproducer is:
diff -Z <(echo "a") <(echo -n "a")
diffutils-3.3-4.fc20 has been submitted as an update for Fedora 20.
diffutils-3.3-4.fc19 has been submitted as an update for Fedora 19.
* should fix your issue,
* was pushed to the Fedora 19 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing diffutils-3.3-4.fc19'
as soon as you are able to.
Please go to the following url:
then log in and leave karma (feedback).
fixed with diffutils-3.3-4.f20
diffutils-3.3-4.fc19 has been pushed to the Fedora 19 stable repository. If problems still persist, please make note of it in this bug report.
diffutils-3.3-4.fc20 has been pushed to the Fedora 20 stable repository. If problems still persist, please make note of it in this bug report.