wxiaoguang
1acf93d854
refactor: clean up git repo and model migration packages ( #38564 )
...
enable the golangci depguard lint rule: deny "models" and its sub
packages in "modelmigration" package.
2026-07-23 01:22:26 +00:00
wxiaoguang
a4526d5a82
refactor: remove Path field from git.Repository ( #38552 )
...
The "path" details should be hidden to other packages
By the way, fix a resource leaking in gogit's CommitNodeIndex
(the file was not closed in CacheCommit)
2026-07-20 18:03:28 +00:00
wxiaoguang
9dc04289aa
refactor: make git package handle all git operations ( #38543 )
...
before: gitrepo vs git packages
after: git package fully handle all git operations
by the way, use `WithRepo(repo)` instead of `WithDir(repo.Path)` to hide
path details.
benefits:
1. remove all unnecessary wrappers, developers no need to struggle with
"which package should be used"
2. simplify code, RepositoryFacade can (will) be used everywhere, all
"path" details are (will be) hidden
2026-07-20 16:07:38 +00:00
wxiaoguang
b06002f449
refactor: git repo and relative path handling ( #38522 )
...
1. simplify "StorageRepo" code
2. simplify git.OpenRepository code
3. by the way, clean up some unused files in git test fixtures.
2026-07-19 07:32:00 +00:00
wxiaoguang
5b078f72aa
refactor: remove Ctx field from git.Repository ( #38500 )
2026-07-17 18:44:31 +08:00
wxiaoguang
60246730b5
Remove wrong "git.DefaultContext" ( #35364 )
2025-08-27 16:31:21 +00:00
TheFox0x7
cc1fdc84ca
Use test context in tests and new loop system in benchmarks ( #33648 )
...
Replace all contexts in tests with go1.24 t.Context()
---------
Co-authored-by: Giteabot <teabot@gitea.io >
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com >
2025-02-20 09:57:40 +00:00
TheFox0x7
33e8e82c4b
Enable tenv and testifylint rules ( #32852 )
...
Enables tenv and testifylint linters
closes: https://github.com/go-gitea/gitea/issues/32842
2024-12-15 10:41:29 +00:00
wxiaoguang
0f3e717a1a
Improve grep search ( #30843 )
...
Reduce the context line number to 1, make "git grep" search respect the
include/exclude patter, and fix #30785
2024-05-03 09:13:48 +00:00
wxiaoguang
f9fdac9809
Limit the max line length when parsing git grep output ( #30418 )
2024-04-12 03:36:34 +00:00
wxiaoguang
8e79aed573
Fix git grep search limit, add test ( #30071 )
...
Fix #30069
2024-03-25 21:25:22 +08:00
wxiaoguang
4734d43e14
Support repo code search without setting up an indexer ( #29998 )
...
By using git's ability, end users (especially small instance users) do
not need to enable the indexer, they could also benefit from the code
searching feature.
Fix #29996


---------
Co-authored-by: silverwind <me@silverwind.io >
2024-03-24 17:05:00 +01:00