Change-Id: Iced588ef2dcc7f96cb7181c41e987eb0e3c0c1f7
my $tmp_dir = abs_path(tempdir(CLEANUP=>1));
my $tmp_spec = "$tmp_dir/$spec_file";
my $without_base = $spec;
- $without_base =~ s!$base/!!;
+ $without_base =~ s!\Q$base\E/!!;
if (my_system("cd $base; git show $commit:$without_base >$tmp_spec 2>/dev/null") != 0) {
- warning("failed to checkout spec file from commit: $commit");
+ warning("failed to checkout spec file from commit: $commit:$without_base");
return;
}
$spec = $tmp_spec;