File tree 1 file changed +8
-16
lines changed
1 file changed +8
-16
lines changed Original file line number Diff line number Diff line change @@ -1391,12 +1391,9 @@ sub replace_config_sub_guess {
1391
1391
open (IN, " git submodule status|" )
1392
1392
|| die " Can't run \" git submodule status\" " ;
1393
1393
while (<IN>) {
1394
- chomp ;
1395
- $_ =~ m / ^(.)(.{40}) ([^ ]+) *\( *([^\(\) ]*)\) *$ / ;
1396
- my $status = $1 ;
1397
- my $local_hash = $2 ;
1398
- my $path = $3 ;
1399
- my $extra = $4 ;
1394
+ $_ =~ m / ^(.)[0-9a-f] {40}\s +(\S +)/ ;
1395
+ my $status = $1 ;
1396
+ my $path = $2 ;
1400
1397
1401
1398
print (" === Submodule: $path \n " );
1402
1399
if (index ($path , " pmix" ) != -1 and list_contains(" pmix" , @disabled_3rdparty_packages )) {
@@ -1419,19 +1416,14 @@ sub replace_config_sub_guess {
1419
1416
exit (1);
1420
1417
}
1421
1418
1422
- # See if the submodule is at the expected git hash
1423
- # (it may be ok if it's not -- just warn the user)
1424
- $extra =~ m / -g(.+)/ ;
1425
- my $remote_hash = $1 ;
1426
- if ($remote_hash ) {
1427
- my $abbrev_local_hash = substr ($local_hash , 0, length ($remote_hash ));
1428
- if ($remote_hash ne $abbrev_local_hash ) {
1419
+ # See if the commit in the submodule is not the same as the
1420
+ # commit that the git submodule thinks it should be.
1421
+ elsif ($status eq " +" ) {
1429
1422
print (" ==> WARNING: Submodule hash is different than upstream.
1430
1423
If this is not intentional, you may want to run:
1431
1424
\" git submodule update --init --recursive\"\n " );
1432
- } else {
1433
- print (" Local hash == remote hash (good!)\n " );
1434
- }
1425
+ } else {
1426
+ print (" Local hash is what is expected by the submodule (good!)\n " );
1435
1427
}
1436
1428
}
1437
1429
}
You can’t perform that action at this time.
0 commit comments