diff(1) -N behaviour - Bug 233402

Yuri Pankov ypankov at fastmail.com
Sat May 23 11:21:13 UTC 2020


Fehmi Noyan ISI via freebsd-hackers wrote:
> Hiya
> 
> Apparently, after we switched from GNU diff to BSD diff, the -N flag no longer assumes absent files as empty.
> There is a bug report about GNU diff compatibility but when I look at diff(1) man page, I see that not treating absent files as empty is intentional rather than a missing functionality.
> 
> If this is not the case, I can work on patch to match to GNU diff behaviour, otherwise, this bug report can be closed I think.
> 
> What’s your take on this?
> 
> -N --new-file
>      If a file is found in only one directory, act as if it was found
>      in the other directory too but was of zero size.
> 
> man for GNU diff
> -N, --new-file
>      treat absent files as empty

I think both descriptions say the same, i.e. "zero size" == "empty"?


More information about the freebsd-hackers mailing list