[Tools] winetest/dissect: Check the build id and get its details in one Git call.
Francois Gouget
fgouget at codeweavers.com
Fri Apr 21 03:40:22 CDT 2017
get_build_info() only returns an empty subject if the commit does not
exist.
Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
---
winetest/dissect | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/winetest/dissect b/winetest/dissect
index c99ef294..f0eaeee7 100755
--- a/winetest/dissect
+++ b/winetest/dissect
@@ -154,13 +154,10 @@ $_ = <IN>;
/^Tests from build ([-.0-9a-zA-Z]+)\r?$/ or mydie "no build header: $_";
my $testbuild = $1;
$testbuild =~ /^[0-9a-f]{40}$/ or mydie "not a valid commit id $testbuild\n";
-my $commit = `git rev-parse --verify $testbuild^0 2>/dev/null`;
-chomp $commit;
-$testbuild eq $commit or mydie "not an existing commit $testbuild\n";
+my ($date, $subject) = get_build_info($testbuild);
+mydie "not an existing commit $testbuild\n" unless $subject ne "";
my $shortbuild = substr($testbuild,0,12);
my $archive = "winetest-$shortbuild.exe";
-
-my ($date, $_subject) = get_build_info($testbuild);
my $short_date = short_date($date);
--
2.11.0
More information about the wine-patches
mailing list