Bug 176458 - diff "white space" switches non-functional
Summary: diff "white space" switches non-functional
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: diffutils
Version: 4
Hardware: i586
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Tim Waugh
QA Contact: Mike McLean
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-12-23 00:26 UTC by james
Modified: 2007-11-30 22:11 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2005-12-23 12:53:21 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description james 2005-12-23 00:26:49 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.10) Gecko/20050716 Firefox/1.0.6

Description of problem:
Consider:
$ cat -A testa
broken$
$

$ cat -A testb
$
  broken$
$

$ diff -b testa testb
1c1,2
< broken
---
>
>   broken

$ diff -B testa testb
1c1,2
< broken
---
>
>   broken






Version-Release number of selected component (if applicable):
diffutils-2.8.1-15

How reproducible:
Always

Steps to Reproduce:
1.diff -bB testa testb
2.
3.
  

Actual Results:  The files are shown to differ with respect to white space.

Expected Results:  man diff
...
       -b     Ignore changes in amount of white space.

       -B     Ignore changes that just insert or delete blank lines.




Additional info:

Comment 1 james 2005-12-23 00:35:09 UTC
Hmm.  Responding to my own bug report, I suppose I want "-w     Ignore white
space when comparing lines.", which I think means that the man page needs some
changes to the description of "-b".  Also, "-B" seems to work in combination
with "-w", but not by itself, yes?

Comment 2 Tim Waugh 2005-12-23 12:53:21 UTC
The description of "-b" is correct as-is.  To clarify, where there is white
space, changed in the amount of it there is get ignored.

Compare this with -w, where even the presence or not of white space is ignored
for comparison.

The "-B" option works correctly and distinctly from "-w".


Note You need to log in before you can comment on or make changes to this bug.