diff options
Diffstat (limited to 'modules/git/commit_submodule.go')
-rw-r--r-- | modules/git/commit_submodule.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/git/commit_submodule.go b/modules/git/commit_submodule.go index 031fd4e5d0..ff253b7eca 100644 --- a/modules/git/commit_submodule.go +++ b/modules/git/commit_submodule.go @@ -35,7 +35,8 @@ func (c *Commit) GetSubModules() (*ObjectCache[*SubModule], error) { return c.submoduleCache, nil } -// GetSubModule get the submodule according entry name +// GetSubModule gets the submodule by the entry name. +// It returns "nil, nil" if the submodule does not exist, caller should always remember to check the "nil" func (c *Commit) GetSubModule(entryName string) (*SubModule, error) { modules, err := c.GetSubModules() if err != nil { |