Re: [PATCH] diff: add --ignore-blank-lines option
- From
Antoine Pelisse <apelisse@gmail.com>
- Date
- Jun 1, 2013, 08:48 UTC
- Message-ID
- <CALWbr2w0rX3kY4doR3twzSpR5AL7gejtMpNZo_x=S1e25Ytwew@mail.gmail.com>
- In-Reply-To
- <CALWbr2xzSC8ZGggCUYbS7ZWEOHnZnxFJWOfHCOBkVZFQS9KcEw@mail.gmail.com>
On Mon, May 27, 2013 at 9:14 AM, Antoine Pelisse <apelisse@gmail.com> wrote:
Show 11 quoted lines
> On Sun, May 26, 2013 at 10:35 PM, Johannes Sixt <j6t@kdbg.org> wrote: >> I'm thinking of diffs of files with CRLF > > Good you did, because I didn't ;-) > >> line breaks, where the CR would count as whitespace in the line, I think. > > With the current implementation, an empty line with CRLF will not show > as a blank line if no space option is given. As CR is a space > according to isspace(3), the line will be removed with any space > option.
Maybe it would be worth adding the diff(1) "--strip-trailing-cr" option. So that you could remove empty lines if you have dos line endings while caring about eol space-changes (or other space changes).