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

Re: Change internal diff default settings

From: Ryan Schmidt <subversion-2008c_at_ryandesign.com>
Date: Tue, 9 Sep 2008 01:09:19 -0500

On Sep 8, 2008, at 22:13, Grigory V. Kareev wrote:

> How I can change internal diff program default settings?
> Didn't find any config vars in ~/.subversion/config or in
> Subversion book.
> I want to add -x --ignore-eol-style permanently. Is it possible?

In the ~/.subversion/config file, you can set diff-cmd to your
desired diff program, but there's no way to send any additional
parameters to that diff program, besides the parameters that
Subversion already sends. So the only way I can think of to do this
is to write a wrapper diff program. For example:

In ~/.subversion/config, add this line:

diff-cmd = /usr/local/bin/diffignorewhitespace

The contents of /usr/local/bin/diffignorewhitespace would be:

#!/bin/bash
diff --ignore-space-change "$@"

(Means: prepend "--ignore-space-change" to the parameters Subversion
is already sending -- "man diff" on my system does not show an "--
ignore-eol-style" parameter, but maybe your diff is different or
newer than mine.)

Make sure /usr/local/bin/diffignorewhitespace has been given the
execute bit:

chmod 755 /usr/local/bin/diffignorewhitespace

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: users-help_at_subversion.tigris.org
Received on 2008-09-09 08:09:47 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.