[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Should "diff" on binary files throw an exit code 2?
From: |
Paul Eggert |
Subject: |
Re: Should "diff" on binary files throw an exit code 2? |
Date: |
Fri, 29 Jun 2007 15:27:30 -0700 |
User-agent: |
Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux) |
In general, plain "diff" should probably return some sort of problem
indication when given a binary file, since the output is not suitable
as a patch.
One workaround is to invoke "cmp -s a b" if "diff" exits with status
2, and to use cmp's exit status to decide whether there was real
trouble.
Another possibility would be to add a new option to "diff", but
someone would have to think that through.