[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn diff / blame -x --ignore-space-change doesn't ignore EOL style changes

From: Stanimir Stamenkov <s7an10_at_netscape.net>
Date: Thu, 21 Apr 2011 06:56:34 +0300

Wed, 20 Apr 2011 21:38:55 +0200, /Johan Corveleyn/:
> On Wed, Apr 20, 2011 at 8:03 PM, Daniel Shahaf wrote:
>> AIUI, --ignore-eol-style + --ignore-space-change ==
>> --ignore-all-space. It seems to me that --ignore-all-space would
>> work for your use case?
> No, I don't think that's correct.
> --ignore-space-change: ignores changes in the amount of
> white-space, but not ignoring "all white-space". This means that
> "having no white-space" in not considered equal to "having
> white-space". Example: "abc def" is considered equal to "abc def",
> but not equal to "abcdef".
> --ignore-all-space: ignores all differences in white-space,
> including between "having no white-space" and "having
> white-space". I.e. "abc def" is considered equal to "abcdef".
> The above two only apply to white-space, not to eol-style, if I'm
> not mistaken. So the --ignore-eol-style is orthogonal.

Yes, that's correct, and --ignore-all-space is not equal to
--ignore-eol-style + --ignore-space-change. Moreover
--ignore-all-space is not as useful as --ignore-space-change, as
Johan points later, but see further comments.

> Can't you just use both options?
> svn diff / blame -x --ignore-space-change -x --ignore-eol-style
> Or, with the short option for ignoring space-change:
> svn diff / blame -x-b -x--ignore-eol-style

You know, I've previously tried this many times and it didn't work
as it basically picks just the last '-x' option discarding the
previous ones, but that made me try what I've been using with the
external 'diff' command (this is on Windows):

     svn diff -x "-b --ignore-eol-style" ...

and it appears to work as expected. I just needed to group all the
needed options. Thanks a bunch! :-)

> (I generally prefer using --ignore-space-change instead of
> --ignore-all-space, because the latter can hide really important
> changes, which change the semantics e.g. in most programming
> languages or xml files and such).

Received on 2011-04-21 06:13:26 CEST

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.