Fix repo file list partial reloading for submodules (#35183)

Fix the TODO and add more tests
This commit is contained in:
wxiaoguang authored and GitHub committed 2025-07-31 09:34:51 +08:00
1 parent 2e8a4a09d5
commit c3f5ea3b1f
6 files changed
+40 -32

No files matched your search

+2 -2
View File
@@ -125,9 +125,9 @@ func TestEntries_GetCommitsInfo(t *testing.T) {
t.Run("NonExistingSubmoduleAsNil", func(t *testing.T) {
commit, err := bareRepo1.GetCommit("HEAD")
require.NoError(t, err)
tree, err := commit.GetTreeEntryByPath("file1.txt")
treeEntry, err := commit.GetTreeEntryByPath("file1.txt")
require.NoError(t, err)
cisf, err := getCommitInfoSubmoduleFile("/any/repo-link", tree, commit, "")
cisf, err := GetCommitInfoSubmoduleFile("/any/repo-link", "file1.txt", commit, treeEntry.ID)
require.NoError(t, err)
assert.Equal(t, &CommitSubmoduleFile{
repoLink: "/any/repo-link",