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

Re: svn commit: r19421 - trunk/tools/hook-scripts

From: Blair Zajac <blair_at_orcaware.com>
Date: 2006-04-20 01:51:01 CEST

maxb@tigris.org wrote:
> Author: maxb
> Date: Wed Apr 19 14:53:05 2006
> New Revision: 19421
>
> Modified:
> trunk/tools/hook-scripts/commit-email.pl.in
>
> Log:
> Followup to r19342. Correct operator precedence bug in commit-email.pl.
>
> * tools/hook-scripts/commit-email.pl.in: Insert parentheses to counter
> unintuitive operator precedence.
>
>
> Modified: trunk/tools/hook-scripts/commit-email.pl.in
> URL: http://svn.collab.net/viewvc/svn/trunk/tools/hook-scripts/commit-email.pl.in?pathrev=19421&r1=19420&r2=19421
> ==============================================================================
> --- trunk/tools/hook-scripts/commit-email.pl.in (original)
> +++ trunk/tools/hook-scripts/commit-email.pl.in Wed Apr 19 14:53:05 2006
> @@ -504,7 +504,7 @@
> my $reply_to = $project->{reply_to};
> my $subject_prefix = $project->{subject_prefix};
> my $subject = $subject_base;
> - my $diff_wanted = $project->{show_diff} and $mode eq 'commit';
> + my $diff_wanted = ($project->{show_diff} and $mode eq 'commit');

Not a big deal, but it may be better just to use the && operator instead, which
has higher precedence and you don't need the ().

Regards,
Blair

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Apr 20 01:51:38 2006

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.