From 9636f9f249301c879f4b49e19ed0314ed49866f8 Mon Sep 17 00:00:00 2001 From: Ole Tange Date: Sat, 17 Oct 2015 17:10:04 +0200 Subject: [PATCH] Fixed bug #46231: {%} with --pipepart broken. --- src/parallel | 6 +++--- testsuite/wanted-results/parallel-local-0.3s | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/parallel b/src/parallel index 70af0b0d..f02ad9f2 100755 --- a/src/parallel +++ b/src/parallel @@ -123,9 +123,9 @@ if($opt::pipepart) { $opt::blocksize = 1 + $size / $Global::max_jobs_running; } @Global::cat_partials = map { pipe_part_files($_) } @opt::a; - # Unget the command as many times as there are parts - $Global::JobQueue->{'commandlinequeue'}->unget( - map { $Global::JobQueue->{'commandlinequeue'}->get() } @Global::cat_partials + # Unget the empty arg as many times as there are parts + $Global::JobQueue->{'commandlinequeue'}{'arg_queue'}->unget( + map { [Arg->new("\0")] } @Global::cat_partials ); } if($opt::eta or $opt::bar or $opt::shuf or $Global::halt_pct) { diff --git a/testsuite/wanted-results/parallel-local-0.3s b/testsuite/wanted-results/parallel-local-0.3s index 1e488d3b..5886b2a0 100644 --- a/testsuite/wanted-results/parallel-local-0.3s +++ b/testsuite/wanted-results/parallel-local-0.3s @@ -517,5 +517,7 @@ bug #46231: {%} with --pipepart broken. Should give 1+2 1 2 1 +echo '**' +** ### 1 .par file from --files expected 1