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

Re: svn commit: r12013 - in branches/locking/subversion/libsvn_fs_base: . bdb

From: Branko ÄŒibej <brane_at_xbc.nu>
Date: 2004-11-27 23:25:59 CET

Ben Collins-Sussman wrote:

>
> On Nov 26, 2004, at 11:30 PM, Branko ÄŒibej wrote:
>
>> sussman@tigris.org wrote:
>>
>>> - if (kind == svn_node_dir)
>>> + if ((kind == svn_node_dir)
>>> + && (strcmp (path, "/") != 0))
>>> path = apr_pstrcat (trail->pool, path, "/", NULL);
>>>
>> You have 4 instances of this very same code in this patch alone.
>> D'you think it would be time for a bit of refactoring?
>>
>
> I considered it, but it doesn't seem worth writing a helper function
> for 2 lines of code. I mean, I think it would actually decrease the
> readability of the code, and I don't expect the code to change in the
> future.

Hah. For starters, it would've made your patch 1/4 the size if you'd
started out with a helper function. What's with svn_fs__canonicalize then?

"And you don't expect the code to change in the future." Back to school
for you, me lad, you've a lot to learn, I see. :-)

-- Brane

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Nov 27 23:28:32 2004

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.