[Tools v2] winetest/dissect: Check the build id and get its details in one Git call.

Francois Gouget fgouget at codeweavers.com
Fri Apr 21 07:56:58 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>
---

Same as before but now truly independent from the $gitdir patch.


 winetest/dissect | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/winetest/dissect b/winetest/dissect
index df5a2fb8..3429419e 100755
--- a/winetest/dissect
+++ b/winetest/dissect
@@ -155,13 +155,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