@@ -303,7 +303,12 @@ static WiseGitIntegration()
303
303
304
304
EditorApplication . quitting += ( ) => m_IsApplicationQuitting = true ;
305
305
306
- m_SubmoduleRoots = ListAllSubmodulePaths ( ) . ToList ( ) ;
306
+ try {
307
+ m_SubmoduleRoots = ListAllSubmodulePaths ( ) . ToList ( ) ;
308
+ } catch ( Exception ex ) {
309
+ Debug . LogError ( "WiseGit failed to obtain list of the submodules on startup." ) ;
310
+ Debug . LogException ( ex ) ;
311
+ }
307
312
}
308
313
309
314
/// <summary>
@@ -437,7 +442,14 @@ public static StatusOperationResult GetStatuses(string path, bool offline, List<
437
442
}
438
443
439
444
if ( ! string . IsNullOrWhiteSpace ( result . Output ) ) {
440
- resultEntries . AddRange ( ExtractStatuses ( result . Output ) ) ;
445
+ foreach ( GitStatusData data in ExtractStatuses ( result . Output ) ) {
446
+
447
+ // Skip submodule folder as they show changes when content has changed OR it has unknown assets (which is confusing).
448
+ if ( m_SubmoduleRoots . Count > 0 && m_SubmoduleRoots . Contains ( data . Path ) )
449
+ continue ;
450
+
451
+ resultEntries . Add ( data ) ;
452
+ }
441
453
}
442
454
443
455
// Check submodules too.
@@ -451,7 +463,14 @@ public static StatusOperationResult GetStatuses(string path, bool offline, List<
451
463
}
452
464
453
465
if ( ! string . IsNullOrWhiteSpace ( result . Output ) ) {
454
- resultEntries . AddRange ( ExtractStatuses ( result . Output , pathFilter : path . Replace ( '\\ ' , '/' ) ) ) ;
466
+ foreach ( GitStatusData data in ExtractStatuses ( result . Output , pathFilter : path . Replace ( '\\ ' , '/' ) ) ) {
467
+
468
+ // Skip submodule folder as they show changes when content has changed OR it has unknown assets (which is confusing).
469
+ if ( m_SubmoduleRoots . Count > 0 && m_SubmoduleRoots . Contains ( data . Path ) )
470
+ continue ;
471
+
472
+ resultEntries . Add ( data ) ;
473
+ }
455
474
}
456
475
}
457
476
@@ -1440,11 +1459,7 @@ public static IEnumerable<string> ListAllSubmodulePaths(int timeout = ONLINE_COM
1440
1459
{
1441
1460
var result = ShellUtils . ExecuteCommand ( Git_Command , $ "submodule status --recursive", timeout , shellMonitor ) ;
1442
1461
1443
- if ( ! string . IsNullOrEmpty ( result . Error ) ) {
1444
- yield break ;
1445
- }
1446
-
1447
- if ( string . IsNullOrWhiteSpace ( result . Output ) ) {
1462
+ if ( ! string . IsNullOrEmpty ( result . Error ) || string . IsNullOrWhiteSpace ( result . Output ) ) {
1448
1463
yield break ;
1449
1464
}
1450
1465
0 commit comments