[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: diff - Odd behavior of opton --ignore-matching-lines
From: |
jaalto |
Subject: |
Re: diff - Odd behavior of opton --ignore-matching-lines |
Date: |
Thu, 23 Feb 2012 09:50:21 +0200 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On 2012-02-22 21:53, Eli Zaretskii wrote:
| > From: Jari Aalto <address@hidden>
| > Date: Wed, 22 Feb 2012 14:29:41 -0500
| >
| >
| > Test under Bash:
| >
| > echo -e "1 2\n1" > a
| > echo -e "2 3\n4" > b
| > diff -u -I '2' a b
| >
| > =>
| >
| > -1 2
| > -1
| > +2 3
| > +4
| >
| > Isn't --ignore-matching-lines supposed to ignore all lines matching REGEXP
| > "2" above?
|
| No. From "diff --help":
|
| -I RE --ignore-matching-lines=RE Ignore changes whose lines all match RE.
| ^^^
Hm. That's not clear still. I wouldn't know: all what?
May I propose that the wording is made more verbose to explain the
behavior in more layman terms.
Manual now:
-I, --ignore-matching-lines=RE
ignore changes whose lines all match RE.
=> Does it mean like this?
-I, --ignore-matching-lines=RE
ignore changes whose lines all match RE. This means that
all lines in hunk from FILE1 and FILE2 must match this
regexp in order for the whole hunk to be ignored.
Jari