1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2025-07-19 09:39:39 +02:00

git/commit: re-implement submodules file reader (#8438)

Reimplement the submodules parser to not depend on the go-git dependency.

See #8222 for the full refactor context.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/8438
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: oliverpool <git@olivier.pfad.fr>
Co-committed-by: oliverpool <git@olivier.pfad.fr>
This commit is contained in:
oliverpool 2025-07-15 00:20:00 +02:00 committed by Gusted
parent 48cc6e684a
commit 5158493ba6
17 changed files with 220 additions and 166 deletions

View file

@ -17,7 +17,6 @@ func (t *Tree) GetTreeEntryByPath(relpath string) (*TreeEntry, error) {
ptree: t,
ID: t.ID,
name: "",
fullName: "",
entryMode: EntryModeTree,
}, nil
}
@ -55,7 +54,7 @@ func (t *Tree) GetBlobByPath(relpath string) (*Blob, error) {
return nil, err
}
if !entry.IsDir() && !entry.IsSubModule() {
if !entry.IsDir() && !entry.IsSubmodule() {
return entry.Blob(), nil
}