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 @@ -1409,12 +1409,9 @@ sub replace_config_sub_guess {
1409
1409
open (IN, " git submodule status|" )
1410
1410
|| die " Can't run \" git submodule status\" " ;
1411
1411
while (<IN>) {
1412
- chomp ;
1413
- $_ =~ m / ^(.)(.{40}) ([^ ]+) *\( *([^\(\) ]*)\) *$ / ;
1414
- my $status = $1 ;
1415
- my $local_hash = $2 ;
1416
- my $path = $3 ;
1417
- my $extra = $4 ;
1412
+ $_ =~ m / ^(.).{40} ([^ ]+) / ;
1413
+ my $status = $1 ;
1414
+ my $path = $2 ;
1418
1415
1419
1416
print (" === Submodule: $path \n " );
1420
1417
if (index ($path , " pmix" ) != -1 and list_contains(" pmix" , @disabled_3rdparty_packages )) {
@@ -1437,19 +1434,14 @@ sub replace_config_sub_guess {
1437
1434
exit (1);
1438
1435
}
1439
1436
1440
- # See if the submodule is at the expected git hash
1441
- # (it may be ok if it's not -- just warn the user)
1442
- $extra =~ m / -g(.+)/ ;
1443
- my $remote_hash = $1 ;
1444
- if ($remote_hash ) {
1445
- my $abbrev_local_hash = substr ($local_hash , 0, length ($remote_hash ));
1446
- if ($remote_hash ne $abbrev_local_hash ) {
1437
+ # See if the commit in the submodule is not the same as the
1438
+ # commit that the git submodule thinks it should be.
1439
+ elsif ($status eq " +" ) {
1447
1440
print (" ==> WARNING: Submodule hash is different than upstream.
1448
1441
If this is not intentional, you may want to run:
1449
1442
\" git submodule update --init --recursive\"\n " );
1450
- } else {
1451
- print (" Local hash == remote hash (good!)\n " );
1452
- }
1443
+ } else {
1444
+ print (" Local hash is what is expected by the submodule (good!)\n " );
1453
1445
}
1454
1446
}
1455
1447
}
You can’t perform that action at this time.
0 commit comments