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

Re: --diff-cmd doesn't use -u per default

From: C. Michael Pilato <cmpilato_at_collab.net>
Date: Tue, 10 Jun 2008 12:34:06 -0400

Julian Foad wrote:
> On Tue, 2008-06-10 at 10:59 -0400, C. Michael Pilato wrote:
>> I seem to be doing alot of talking to myself at the moment, but that's cool.
>
> I'm listening. Sorry that you didn't read my mind and know that's what I
> was doing. :-)
>
>> For the record, I think the correct-er of the fixes is the second patch.
>
> Your patch 1 (send user_args==NULL rather than uninitialised) is
> essential to fix this regression.

Okey dokey.

> Your patch 2 ((svn_io_run_diff): Don't check user_args for NULL-ness;
> consult the num_user_args instead) is bad: it will break this public API
> for clients that were relying on it working the way it did work, and
> initialising only 'user_args' but not 'num_user_args'. (Note also that
> the test for null occurs twice in the function and your patch changes
> only one occurrence.)

Ah, thanks.

> FWIW, it looks to me like this bug was introduced in r30053 in the
> calling code. The svn_io_run_diff() API has been stable for ages.
>
> The correct fix should include:
>
> * Your patch 1.
>
> * Update the doc string for svn_io_run_diff() to match the
> implementation, which is to say that user_args must be NULL to
> indicate no user args specified and thus get the default "-u".
> (Presently it's ambiguous on whether user_args need be NULL
> and/or num_user_args need be 0 to get that behaviour.)

Alright. I've some time, so I'll go this route.

-- 
C. Michael Pilato <cmpilato_at_collab.net>
CollabNet   <>   www.collab.net   <>   Distributed Development On Demand

Received on 2008-06-10 18:34:24 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.