[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
diff(1) Picks Different Lines with -u.
From: |
Ralph Corderoy |
Subject: |
diff(1) Picks Different Lines with -u. |
Date: |
Sat, 17 Mar 2012 00:47:49 +0000 |
Hi,
[Please CC, I'm not subscribed.]
I found that `diff' and `diff -u' in diffutils 3.2 show a different
range of lines has changed. 1220a1221,1242 v. -1219,3 +1219,25. The
former, no -u, shows an extra line has been added at the start of the
chunk compared with -u. This puzzled me for a while but then I realised
the line repeats later in the file and -u shows it as the last line of
the added chunk.
It is reasonable to expect -u to only change the output format and not
which lines are reported as different? When studying the diff in both
formats, as I was, it took a bit of head-scratching to understand the
apparent discrepancy. I should be spending that effort on the diff
itself. :-)
Cheers, Ralph.
- diff(1) Picks Different Lines with -u.,
Ralph Corderoy <=