Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Get rid of a reliable segfault/glibc dump by adding 'eager do ' to a …
…few for loops. This ... bites.
  • Loading branch information
japhb committed Dec 27, 2012
1 parent 1a6126e commit 1e9fcfa
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions bench
Expand Up @@ -73,14 +73,14 @@ multi MAIN ('fetch', *@components) {

# Fetch commits in bare mirror first, then requested checkouts
say '~~~> FETCHING';
for $bare, $comp<checkouts>.list -> $dir {
eager do for $bare, $comp<checkouts>.list -> $dir {
my $path = "$comp_dir/$dir";
next unless $path.path.d;

say "----> $dir";
chdir $path;
run < git fetch >, $_ for < -t -u >;
}
};

# Find all tags known in this component
%*ENV<GIT_DIR> = "$comp_dir/$bare";
Expand All @@ -91,7 +91,7 @@ multi MAIN ('fetch', *@components) {

# Pull into non-tag checkouts
say '~~~> PULLING';
for $comp<checkouts>.list -> $dir {
eager do for $comp<checkouts>.list -> $dir {
my $path = "$comp_dir/$dir";
next unless "$path/.git".path.d;
next if $dir eq any(@all-tags);
Expand Down Expand Up @@ -265,7 +265,7 @@ sub rmtree ($dir, :$noisy = True) {

#= Run code for every requested component
sub for-components (@components, &code) {
for explode-components(@components) -> $comp {
eager do for explode-components(@components) -> $comp {
my $name = $comp<info><name>;
say "==> $name";

Expand Down

0 comments on commit 1e9fcfa

Please sign in to comment.