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

Re: svn commit: r1131383 - in /subversion/trunk/subversion: include/private/svn_magic.h libsvn_client/add.c libsvn_client/client.h libsvn_client/commit.c libsvn_subr/io.c libsvn_subr/magic.c

From: Stefan Sperling <stsp_at_elego.de>
Date: Mon, 6 Jun 2011 10:58:01 +0200

On Mon, Jun 06, 2011 at 09:08:11AM +0100, Philip Martin wrote:
> Stefan Sperling <stsp_at_elego.de> writes:
>
> > If an empty file gets a property that svn considers binary the tests
> > start failing all over the place.
>
> Perhaps the testsuite should use its own magic database?

Well, that would just cover up symptoms in the test suite.

The problem is that some operations behave differently.
For instance, running diffs against empty files stops working.
If people use empty files to try things out in Subversion,
they won't expect it to complain, by default(!), when certain
operations are run on the these files.

So setting a binary mime-type on empty files by default is really not
a great idea. Even from the end-user perspective, not just in the test
suite. If people set it manually then they can deal with the consequences.

Also, if someone out there can find a magic DB that breaks our tests,
then I'd much rather fix our magic.c code. We must treat stuff coming
from libmagic as untrusted input, and not fail just because it returns
some junk.
Received on 2011-06-06 10:58:41 CEST

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

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