On Thu, Jun 6, 2013 at 3:34 PM, Célestin Matte
<[email protected]> wrote:
> - strings which don't need interpolation are single-quoted for more clarity
> and
> slight gain of performance
> - interpolation is preferred over concatenation in many cases, for more
> clarity
> - variables are always used with the ${} operator inside strings
> - strings including double-quotes are written with qq() so that the quotes do
> not have to be escaped
>
> Signed-off-by: Célestin Matte <[email protected]>
> Signed-off-by: Matthieu Moy <[email protected]>
> ---
> contrib/mw-to-git/git-remote-mediawiki.perl | 250
> +++++++++++++--------------
> 1 file changed, 124 insertions(+), 126 deletions(-)
>
> diff --git a/contrib/mw-to-git/git-remote-mediawiki.perl
> b/contrib/mw-to-git/git-remote-mediawiki.perl
> index 1271527..0e2152d 100755
> --- a/contrib/mw-to-git/git-remote-mediawiki.perl
> +++ b/contrib/mw-to-git/git-remote-mediawiki.perl
> @@ -344,10 +344,10 @@ sub get_mw_pages {
> # $out = run_git("command args", "raw"); # don't interpret output as
> UTF-8.
> sub run_git {
> my $args = shift;
> - my $encoding = (shift || "encoding(UTF-8)");
> - open(my $git, "-|:$encoding", "git " . $args)
> - or die "Unable to open: $!\n";
> - my $res = do {
> + my $encoding = (shift || 'encoding(UTF-8)');
> + my $res = do {
> + open(my $git, "-|:$encoding", "git ${args}")
> + or die "Unable to fork: $!\n";
> local $/ = undef;
> <$git>
> };
A change sneaked in here not mentioned by the commit message and not
related to the other changes. open() is now inside the do{} block.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html