@@ -307,13 +307,18 @@ func TestSubmodule(t *testing.T) {
307307 cmd .Dir = mainPath
308308 require .NoError (t , cmd .Run (), "adding submodule" )
309309
310+ cmd = gitCommand (t , mainRepo , "commit" , "-m" , "add submodule" )
311+ addAuthorInfo (cmd , & timestamp )
312+ require .NoError (t , cmd .Run (), "committing submodule to main" )
313+
310314 // Analyze the main repo:
311315 h , err := sizes .ScanRepositoryUsingGraph (
312316 mainRepo , git .AllReferencesFilter , sizes .NameStyleNone , false ,
313317 )
314318 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" )
317322
318323 // Analyze the submodule:
319324 submRepo2 , err := git .NewRepository (filepath .Join (mainPath , "sub" ))
0 commit comments