code: func (s *Submodule) Init() error {
  	cfg, err := s.w.r.Storer.Config()
  	if err != nil {
  		return err
  	}
  
  	_, ok := cfg.Submodules[s.c.Name]
  	if ok {
  		return ErrSubmoduleAlreadyInitialized
  	}
  
  	s.initialized = true
  
  	cfg.Submodules[s.c.Name] = s.c
  	return s.w.r.Storer.SetConfig(cfg)
  }
docs: // Init initialize the submodule reading the recorded Entry in the index for
  // the given submodule