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

Re: svn commit: rev 5491 - in trunk/subversion: include libsvn_client

From: Greg Stein <gstein_at_lyra.org>
Date: 2003-03-29 03:55:08 CET

On Fri, Mar 28, 2003 at 08:19:08PM -0600, rooneg@tigris.org wrote:
> Author: rooneg
> Date: Fri Mar 28 20:19:07 2003
> New Revision: 5491
>
> Modified:
> trunk/subversion/include/svn_error_codes.h
> trunk/subversion/libsvn_client/diff.c
> Log:
> Attempt to reduce the number of bug reports from users who are used to using
> 'svn diff -x' and are confused by the internal diff library's inability to
> reproduce all the options of GNU diff.

Ooh! Good one!

>...
> +++ trunk/subversion/libsvn_client/diff.c Fri Mar 28 20:19:07 2003
> @@ -285,6 +285,26 @@
> {
> svn_diff_t *diff;
>
> + /* We don't currently support any options (well, other than -u, since we
> + default to unified diff output anyway), so if we received anything
> + other than that it's an error. */
> + if (diff_cmd_baton->options && diff_cmd_baton->options->nelts)
> + {
> + int i;
> +
> + for (i = 0; i < diff_cmd_baton->options->nelts; ++i)

<style-nit mode="free-to-ignore">

The second test in the "if" is superfluous. The loop just won't run. I'd
take the reduction is apparent complexity over the cycles saved by avoiding
the loop setup.

</style-nit>

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Mar 29 03:52:27 2003

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.