You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Greg Stein <gs...@gmail.com> on 2008/08/22 02:24:48 UTC

Re: svn commit: r32628 - trunk/subversion/tests/libsvn_fs

On Thu, Aug 21, 2008 at 4:44 PM,  <hw...@tigris.org> wrote:
>...
> +++ trunk/subversion/tests/libsvn_fs/fs-test.c  Thu Aug 21 16:44:23 2008        (r32628)
>...
> @@ -4383,8 +4383,7 @@ verify_checksum(const char **msg,
>   svn_fs_txn_t *txn;
>   svn_fs_root_t *txn_root;
>   svn_stringbuf_t *str;
> -  unsigned char expected_digest[APR_MD5_DIGESTSIZE];
> -  unsigned char actual_digest[APR_MD5_DIGESTSIZE];
> +  svn_checksum_t *expected_checksum, *actual_checksum;

It is highly preferred to have one symbol declaration per line.

>...

Cheers,
-g

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn commit: r32628 - trunk/subversion/tests/libsvn_fs

Posted by Karl Fogel <kf...@red-bean.com>.
"Greg Stein" <gs...@gmail.com> writes:
> Yah. I looked briefly in the hacking guide. Not sure it ever made it
> there, but I think I recall discussing it with sussman, and he agreed.
>
> The reason that I prefer it is:
>
> const char *var1, **var2;
>
> It is sometimes difficult to see that var2 is different. One per line
> tends to make stuff like the above clearer.

Yeah... I kind of agree in this case, but am wary of loading us down
with even more coding conventions.  We're bordering on being a
"high-maintenance project" I think :-), and I'd rather see us relax
about some conventions than add yet more.

YMMV, though, and if you want to add something to hacking.html, I won't
object (beyond the above statement of preference).

-K

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn commit: r32628 - trunk/subversion/tests/libsvn_fs

Posted by Greg Stein <gs...@gmail.com>.
Yah. I looked briefly in the hacking guide. Not sure it ever made it
there, but I think I recall discussing it with sussman, and he agreed.

The reason that I prefer it is:

const char *var1, **var2;

It is sometimes difficult to see that var2 is different. One per line
tends to make stuff like the above clearer.

Cheers,
-g

On Fri, Aug 22, 2008 at 4:18 PM, Karl Fogel <kf...@red-bean.com> wrote:
> "Greg Stein" <gs...@gmail.com> writes:
>> On Thu, Aug 21, 2008 at 4:44 PM,  <hw...@tigris.org> wrote:
>>> +++ trunk/subversion/tests/libsvn_fs/fs-test.c  Thu Aug 21 16:44:23 2008        (r32628)
>>>...
>>> @@ -4383,8 +4383,7 @@ verify_checksum(const char **msg,
>>>   svn_fs_txn_t *txn;
>>>   svn_fs_root_t *txn_root;
>>>   svn_stringbuf_t *str;
>>> -  unsigned char expected_digest[APR_MD5_DIGESTSIZE];
>>> -  unsigned char actual_digest[APR_MD5_DIGESTSIZE];
>>> +  svn_checksum_t *expected_checksum, *actual_checksum;
>>
>> It is highly preferred to have one symbol declaration per line.
>
> Not sure we've been following that consistently (also not sure everyone
> would agree...)  I leave it to you two to settle :-).
>
> -Karl
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn commit: r32628 - trunk/subversion/tests/libsvn_fs

Posted by Greg Stein <gs...@gmail.com>.
hehe... not that bothered by it. I wrote my email and raised
awareness. That's about where I want to be :-)

On Fri, Aug 22, 2008 at 4:55 PM, Hyrum K. Wright
<hy...@mail.utexas.edu> wrote:
>
> Karl Fogel wrote:
>>
>> "Greg Stein" <gs...@gmail.com> writes:
>>>
>>> On Thu, Aug 21, 2008 at 4:44 PM,  <hw...@tigris.org> wrote:
>>>>
>>>> +++ trunk/subversion/tests/libsvn_fs/fs-test.c  Thu Aug 21 16:44:23 2008        (r32628)
>>>> ...
>>>> @@ -4383,8 +4383,7 @@ verify_checksum(const char **msg,
>>>>  svn_fs_txn_t *txn;
>>>>  svn_fs_root_t *txn_root;
>>>>  svn_stringbuf_t *str;
>>>> -  unsigned char expected_digest[APR_MD5_DIGESTSIZE];
>>>> -  unsigned char actual_digest[APR_MD5_DIGESTSIZE];
>>>> +  svn_checksum_t *expected_checksum, *actual_checksum;
>>>
>>> It is highly preferred to have one symbol declaration per line.
>>
>> Not sure we've been following that consistently (also not sure everyone
>> would agree...)  I leave it to you two to settle :-).
>
> I'm easy either way.  As a general rule, I try to keep symbols declarations on separate lines, but in cases like this where there is tight coupling between the two I'm not as strict.  There are *many* places where were we have multiple symbols defined together, and I'm hesitant to define a hard rule for reasons Karl mentions elsethread.  In this case, I don't think I'll change it, but you're free to if it is too bothersome. :)
>
> -Hyrum
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn commit: r32628 - trunk/subversion/tests/libsvn_fs

Posted by "Hyrum K. Wright" <hy...@mail.utexas.edu>.
Karl Fogel wrote:
> "Greg Stein" <gs...@gmail.com> writes:
>> On Thu, Aug 21, 2008 at 4:44 PM,  <hw...@tigris.org> wrote:
>>> +++ trunk/subversion/tests/libsvn_fs/fs-test.c  Thu Aug 21 16:44:23 2008        (r32628)
>>> ...
>>> @@ -4383,8 +4383,7 @@ verify_checksum(const char **msg,
>>>   svn_fs_txn_t *txn;
>>>   svn_fs_root_t *txn_root;
>>>   svn_stringbuf_t *str;
>>> -  unsigned char expected_digest[APR_MD5_DIGESTSIZE];
>>> -  unsigned char actual_digest[APR_MD5_DIGESTSIZE];
>>> +  svn_checksum_t *expected_checksum, *actual_checksum;
>> It is highly preferred to have one symbol declaration per line.
> 
> Not sure we've been following that consistently (also not sure everyone
> would agree...)  I leave it to you two to settle :-).

I'm easy either way.  As a general rule, I try to keep symbols declarations on 
separate lines, but in cases like this where there is tight coupling between the 
two I'm not as strict.  There are *many* places where were we have multiple 
symbols defined together, and I'm hesitant to define a hard rule for reasons 
Karl mentions elsethread.  In this case, I don't think I'll change it, but 
you're free to if it is too bothersome. :)

-Hyrum


Re: svn commit: r32628 - trunk/subversion/tests/libsvn_fs

Posted by Karl Fogel <kf...@red-bean.com>.
"Greg Stein" <gs...@gmail.com> writes:
> On Thu, Aug 21, 2008 at 4:44 PM,  <hw...@tigris.org> wrote:
>> +++ trunk/subversion/tests/libsvn_fs/fs-test.c  Thu Aug 21 16:44:23 2008        (r32628)
>>...
>> @@ -4383,8 +4383,7 @@ verify_checksum(const char **msg,
>>   svn_fs_txn_t *txn;
>>   svn_fs_root_t *txn_root;
>>   svn_stringbuf_t *str;
>> -  unsigned char expected_digest[APR_MD5_DIGESTSIZE];
>> -  unsigned char actual_digest[APR_MD5_DIGESTSIZE];
>> +  svn_checksum_t *expected_checksum, *actual_checksum;
>
> It is highly preferred to have one symbol declaration per line.

Not sure we've been following that consistently (also not sure everyone
would agree...)  I leave it to you two to settle :-).

-Karl

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org