Skip to content

Commit

Permalink
Pull after fetching; for now, this DWIM, but will probably need to be…
Browse files Browse the repository at this point in the history
… readdressed later. Also, simply splitting into loops is not trouncing Rakudo bug #115390. :-(
  • Loading branch information
Geoffrey Broadwell committed Dec 10, 2012
1 parent 2253bd1 commit 99da16f
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions bench
Expand Up @@ -68,13 +68,38 @@ multi MAIN ('fetch', *@components) {
next;
}

# Work around Rakudo bug #115390 by splitting into multiple loops
# (And this time, it doesn't even seem to completely go away!)

# Fetch commits in bare mirror first, then requested checkouts
say '~~~> FETCHING';
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";
my $tag-list = open 'git tag', :p;
my @all-tags = $tag-list.lines;
$tag-list.close;
%*ENV.delete('GIT_DIR');

# Pull into non-tag checkouts
say '~~~> PULLING';
for $comp<checkouts>.list -> $dir {
my $path = "$comp_dir/$dir";
next unless "$path/.git".path.d;
next if $dir eq any(@all-tags);

say "----> $dir";
chdir $path;
run < git pull >;
}
}
}

Expand Down

0 comments on commit 99da16f

Please sign in to comment.