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

Re: svn commit: r31971 - branches/issue-2843-dev/subversion/libsvn_wc

From: Karl Fogel <kfogel_at_red-bean.com>
Date: Wed, 02 Jul 2008 17:25:36 -0400

firemeteor_at_tigris.org writes:
> Log:
> On the issue-2843-dev branch.
>
> Suggested by blair and Lorenz <lorenznl_at_yahoo.com>
>
> * subversion/libsvn_wc/entries.c
> (read_entry): Get rid of the bit operation.

Well, you didn't just get rid of the bit operation; rather, you changed
from bitwise operators to logical operators. Also, there's a special
syntax for recording who suggested things. Here's a new log message:

   On the issue-2843-dev branch.
   
   * subversion/libsvn_wc/entries.c
     (read_entry): Use logical instead of bitwise operators.

   Suggested by: blair
                 Lorenz <lorenznl_at_yahoo.com>

On to the code...

> --- branches/issue-2843-dev/subversion/libsvn_wc/entries.c (r31970)
> +++ branches/issue-2843-dev/subversion/libsvn_wc/entries.c (r31971)
> @@ -504,7 +504,8 @@ read_entry(svn_wc_entry_t **new_entry,
> should not show up here. Otherwise, something bad may have
> happened. However, infinity value itself will always be okay. */
> is_this_dir = !name;
> - invalid = is_this_dir ^ (entry->depth != svn_depth_exclude);
> + /* '!=': XOR */
> + invalid = is_this_dir != (entry->depth != svn_depth_exclude);
> if (entry->depth != svn_depth_infinity && invalid)
> return svn_error_createf
> (SVN_ERR_ENTRY_ATTRIBUTE_INVALID, NULL,

I'd leave out that new comment -- it doesn't really clarify anything.
People can just read the code here and they'll understand.

Best,
-Karl

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-07-02 23:26:34 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.