Skip to content

Commit 9ce431d

Browse files
committed
update
1 parent f130838 commit 9ce431d

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

custom/conf/app.example.ini

-3
Original file line numberDiff line numberDiff line change
@@ -1886,9 +1886,6 @@ LEVEL = Info
18861886
;; Time to keep items in cache if not used, default is 8760 hours.
18871887
;; Setting it to -1 disables caching
18881888
;ITEM_TTL = 8760h
1889-
;;
1890-
;; Only enable the cache when repository's commits count great than
1891-
;COMMITS_COUNT = 1000
18921889

18931890
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
18941891
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

modules/git/repo_base_gogit.go

+5-2
Original file line numberDiff line numberDiff line change
@@ -81,15 +81,18 @@ func OpenRepository(ctx context.Context, repoPath string) (*Repository, error) {
8181
return nil, err
8282
}
8383

84-
return &Repository{
84+
repo := &Repository{
8585
Path: repoPath,
8686
gogitRepo: gogitRepo,
8787
gogitStorage: storage,
8888
tagCache: newObjectCache[*Tag](),
8989
commitCache: make(map[string]*Commit),
9090
Ctx: ctx,
9191
objectFormat: ParseGogitHash(plumbing.ZeroHash).Type(),
92-
}, nil
92+
}
93+
repo.lastCommitCache = newLastCommitCache(repo.Path, repo, cache.GetCache())
94+
95+
return repo, nil
9396
}
9497

9598
// Close this repository, in particular close the underlying gogitStorage if this is not nil

0 commit comments

Comments
 (0)