@@ -307,13 +307,18 @@ func TestSubmodule(t *testing.T) {
307
307
cmd .Dir = mainPath
308
308
require .NoError (t , cmd .Run (), "adding submodule" )
309
309
310
+ cmd = gitCommand (t , mainRepo , "commit" , "-m" , "add submodule" )
311
+ addAuthorInfo (cmd , & timestamp )
312
+ require .NoError (t , cmd .Run (), "committing submodule to main" )
313
+
310
314
// Analyze the main repo:
311
315
h , err := sizes .ScanRepositoryUsingGraph (
312
316
mainRepo , git .AllReferencesFilter , sizes .NameStyleNone , false ,
313
317
)
314
318
require .NoError (t , err , "scanning repository" )
315
- assert .Equal (t , counts .Count32 (1 ), h .UniqueBlobCount , "unique blob count" )
316
- assert .Equal (t , counts .Count32 (1 ), h .MaxExpandedBlobCount , "max expanded blob count" )
319
+ assert .Equal (t , counts .Count32 (2 ), h .UniqueBlobCount , "unique blob count" )
320
+ assert .Equal (t , counts .Count32 (2 ), h .MaxExpandedBlobCount , "max expanded blob count" )
321
+ assert .Equal (t , counts .Count32 (1 ), h .MaxExpandedSubmoduleCount , "max expanded submodule count" )
317
322
318
323
// Analyze the submodule:
319
324
submRepo2 , err := git .NewRepository (filepath .Join (mainPath , "sub" ))
0 commit comments