File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -385,18 +385,19 @@ func configParseSubModules(rd io.Reader) (*ObjectCache, error) {
385385 submoduleCache := newObjectCache ()
386386 var subModule * SubModule
387387 for scanner .Scan () {
388- if strings .HasPrefix (scanner .Text (), "[" ) {
388+ line := strings .TrimSpace (scanner .Text ())
389+ if strings .HasPrefix (line , "[" ) {
389390 if subModule != nil {
390391 submoduleCache .Set (subModule .Name , subModule )
391392 subModule = nil
392393 }
393- if strings .HasPrefix (scanner . Text () , "[submodule" ) {
394+ if strings .HasPrefix (line , "[submodule" ) {
394395 subModule = & SubModule {}
395396 }
396397 continue
397398 }
398399 if subModule != nil {
399- fields := strings .Split (scanner . Text () , "=" )
400+ fields := strings .Split (line , "=" )
400401 k := strings .TrimSpace (fields [0 ])
401402 if k == "path" {
402403 subModule .Name = strings .TrimSpace (fields [1 ])
You can’t perform that action at this time.
0 commit comments