https://www.redmine.org/https://www.redmine.org/favicon.ico?16793021292011-01-18T06:01:50ZRedmineRedmine - Patch #1476: Ignore whitespace when using SVN (requires installation of gnu diff)https://www.redmine.org/issues/1476?journal_id=242132011-01-18T06:01:50ZToshi MARUYAMA
<ul><li><strong>Category</strong> set to <i>SCM</i></li></ul> Redmine - Patch #1476: Ignore whitespace when using SVN (requires installation of gnu diff)https://www.redmine.org/issues/1476?journal_id=288662011-05-12T15:36:07ZEnrique Garcia
<ul></ul><p>Since this patch was released, subversion gained white-spacing ignoring habilities (to be precise, v1.4 onwards support this) so there's a way of doing this without relying on having the diff program installed.</p>
<p>Locate the following line of the <code>diff</code> method inside <code>/lib/redmine/scm/adapters/subversion.rb</code>:</p>
<pre>
cmd = "#{SVN_BIN} diff -r "
</pre>
<p>And replace it with this one:</p>
<pre>
cmd = "#{SVN_BIN} diff -x '--ignore-all-space --ignore-eol-style' -r "
</pre>
<p>The single quotes after -x are intentional. The space after <code>-r</code> is also important.</p>
<p>You can customize the way the spaces are ignored by changing the options passed to <code>-x</code> ; type <code>svn diff help</code> on the console and look under the <code>-x</code> option for more info.</p> Redmine - Patch #1476: Ignore whitespace when using SVN (requires installation of gnu diff)https://www.redmine.org/issues/1476?journal_id=452452013-02-04T06:53:13ZCharles Sporkman
<ul></ul><p>Just wanted to throw in my $0.02 and note this is really necessary to make casual diff-ing useful. Just brought in some code that had weird whitespace changes and windows line endings. The redmine diff was totally useless in that instance.</p>
<p>What has to happen to commit this? Do we need a patch to add a "ignore whitespace" toggle in the repo view?</p>
<p>On 2.2.2, this is what the command looks like:</p>
<p><code>cmd = "#{self.class.sq_bin} diff -x '--ignore-all-space --ignore-eol-style' -r "</code></p> Redmine - Patch #1476: Ignore whitespace when using SVN (requires installation of gnu diff)https://www.redmine.org/issues/1476?journal_id=564182014-05-21T10:17:36ZMathias Fischer
<ul></ul><p>+1 but should be optional per repository like in <a class="issue tracker-2 status-1 priority-3 priority-lowest" title="Feature: Ignore whitespace when using GIT (New)" href="https://www.redmine.org/issues/11414">#11414</a> mentioned</p>