aboutsummaryrefslogtreecommitdiffstats
path: root/modules/git/submodule_test.go
Commit message (Collapse)AuthorAgeFilesLines
* Enable testifylint rules (#34075)TheFox0x72025-03-311-6/+6
| | | | enable testifylint rules disabled in: https://github.com/go-gitea/gitea/pull/34054
* Remove context from git struct (#33793)TheFox0x72025-03-041-3/+3
| | | | Argument is moved from struct init in command run, which lets us remove context from struct.
* Use test context in tests and new loop system in benchmarks (#33648)TheFox0x72025-02-201-2/+1
| | | | | | | | Replace all contexts in tests with go1.24 t.Context() --------- Co-authored-by: Giteabot <teabot@gitea.io> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Inherit submodules from template repository content (#16237)Steffen Schröter2025-01-011-0/+48
| | | | | | | | Fix #10316 --------- Signed-off-by: Steffen Schröter <steffen@vexar.de> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Fix submodule parsing (#32571)Lunny Xiao2024-11-201-42/+0
| | | | | | | Fix #32568, parse `.gitmodules` correctly --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Implement FSFE REUSE for golang files (#21840)flynnnnnnnnnn2022-11-271-2/+1
| | | | | | | | | Change all license headers to comply with REUSE specification. Fix #16132 Co-authored-by: flynnnnnnnnnn <flynnnnnnnnnn@github> Co-authored-by: John Olheiser <john.olheiser@gmail.com>
* format with gofumpt (#18184)65432022-01-201-1/+1
| | | | | | | | | | | * gofumpt -w -l . * gofumpt -w -l -extra . * Add linter * manual fix * change make fmt
* Compare SSH_DOMAIN when parsing submodule URLs (#12753)mrsdizzie2020-09-071-17/+19
| | | | | Right now we only compare the hostname from a submodule with the prefixURL it is viewed from to check if the submodule is hosted on the same Gitea instance. This adds an additional check to compare it against SSH_DOMAIN as well since the same Gitea instance might have a different hostname for SSH and if the submodule uses that hostname we should also detect that and link to the proper DOMAIN value. Fixes #12747, #9756
* Do not add prefix on http/https submodule links (#12477)zeripath2020-08-131-0/+1
| | | | | Fix #12345 Signed-off-by: Andrew Thornton <art27@cantab.net>
* Fix submodule paths when AppSubUrl is not root (#11098)zeripath2020-04-221-14/+14
| | | | | | | | Fix submodule paths when AppSubUrl is not root Fix #11002 Signed-off-by: Andrew Thornton <art27@cantab.net>
* Refactor submodule URL parsing (#7100)mrsdizzie2019-06-031-1/+12
| | | | | | | | | | Use combination of url.Parse and regex to parse refURL rather than by hand with indexes & attempt to check if refURL is from same instance and adjust output to match. Also now return empty string instead of our original guess at URL if we are unable to parse it. Fixes #1526
* move code.gitea.io/git to code.gitea.io/gitea/modules/git (#6364)Lunny Xiao2019-03-271-0/+29
* move code.gitea.io/git to code.gitea.io/gitea/modules/git * fix imports * fix fmt * fix misspell * remove wrong tests data * fix unit tests * fix tests * fix tests * fix tests * fix tests * fix tests * enable Debug to trace the failure tests * fix tests * fix tests * fix tests * fix tests * fix tests * comment commit count tests since git clone depth is 50 * fix tests * update from code.gitea.io/git * revert change to makefile