From: Johannes Sixt Date: Sun, 26 May 2013 20:35:54 GMT Subject: Re: [PATCH] diff: add --ignore-blank-lines option Message-ID: <51A2722A.8040200@kdbg.org> In-Reply-To: <1369591098-11267-1-git-send-email-apelisse@gmail.com> Am 26.05.2013 19:58, schrieb Antoine Pelisse: > The goal of the patch is to introduce the GNU diff > -B/--ignore-blank-lines as closely as possible. The short option is not > available because it's already used for "break-rewrites". > > When this option is used, git-diff will not create hunks that simply > adds or removes empty lines, but will still show empty lines > addition/suppression if they are close enough to "valuable" changes. So when an addition or removal of a blank line appears in a hunk that also has non-blank-line changes, the addition or removal is not treated specially? How is a blank line defined? What happens if a line that has only whitespace is added or removed? I'm thinking of diffs of files with CRLF line breaks, where the CR would count as whitespace in the line, I think. > +--ignore-blank-lines:: > + Ignore changes whose lines are all blank. I think this is too terse and does not convey what the option really does. > +test_expect_success 'ignore-blank-lines: only new lines' ' > + seq 5 >x && Please use test_seq instead of seq in all new tests. -- Hannes