Skip to content

Commit 5d9870f

Browse files
committed
fix gogit again
Signed-off-by: Andrew Thornton <art27@cantab.net>
1 parent da93296 commit 5d9870f

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

modules/git/repo_language_stats_gogit.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ import (
1111
"bytes"
1212
"context"
1313
"io"
14-
"path/filepath"
1514

1615
"code.gitea.io/gitea/modules/analyze"
1716
"code.gitea.io/gitea/modules/log"
@@ -47,14 +46,14 @@ func (repo *Repository) GetLanguageStats(commitID string) (map[string]int64, err
4746
var checker *CheckAttributeReader
4847

4948
if CheckGitVersionAtLeast("1.7.8") == nil {
50-
indexFilename, deleteTemporaryFile, err := repo.ReadTreeToTemporaryIndex(commitID)
49+
indexFilename, workTree, deleteTemporaryFile, err := repo.ReadTreeToTemporaryIndex(commitID)
5150
if err == nil {
5251
defer deleteTemporaryFile()
5352
checker = &CheckAttributeReader{
5453
Attributes: []string{"linguist-vendored", "linguist-generated", "linguist-language"},
5554
Repo: repo,
5655
IndexFile: indexFilename,
57-
WorkTree: filepath.Base(indexFilename),
56+
WorkTree: workTree,
5857
}
5958
ctx, cancel := context.WithCancel(DefaultContext)
6059
if err := checker.Init(ctx); err != nil {

0 commit comments

Comments
 (0)