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

Re: svn commit: r996581 - in /subversion/trunk/subversion: libsvn_diff/parse-diff.c tests/cmdline/patch_tests.py

From: Stefan Sperling <stsp_at_elego.de>
Date: Sat, 18 Sep 2010 10:57:07 +0200

On Sat, Sep 18, 2010 at 09:21:31AM +0200, Alan Barrett wrote:
> On Sat, 18 Sep 2010, Daniel Shahaf wrote:
> > "Fewest path components, shortest basename, total filename length".
> >
> > It's predictable, but it seems a bit arbitrary?
>
> It does seem a bit arbitrary, but I was able to rationalise it as
> follows: "fewest path components" is good for choosing between
> "subdir/file" and "../../other-branch/dir/subdir/file"; "shortest
> basename" is good for choosing between "file.old" and "file", or
> between "file" and "file.new"; "total filename length" is good for
> choosing between "subdir/file" and "subdir.old/file". You still need a
> tiebreaker of last resort after all that.

If there's a tie, we can use the "new" name.

I suppose what UNIX patch does has been working well for everybody
for a heck of a long time. There's no point in trying to improve on
it unless we encounter real shortcomings in practice.

Stefan
Received on 2010-09-18 10:58:15 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.