aboutsummaryrefslogtreecommitdiffstats
path: root/services/gitdiff/submodule_test.go
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* Link to tree views of submodules if possible (#33424)Rowan Bohde2025-01-301-1/+1
| | | | | | | | | | | | | | This is a follow-up to https://github.com/go-gitea/gitea/pull/33097. When linking a submodule at a commit in either the repo view, or a diff when adding a new submodule, link to the tree view of that submodules intead of the individual commit. This shows the user the full tree, instead of the diff of the commit. This makes the assumption that the tree for a given SHA is at `<repo_url>/tree/<sha>`. This URL format is supported by both Github & Gitlab, but not Gitea. To fix this, add a redirect from `<username>/<repo>/tree/<ref>` to `<username>/<repo>/src/<ref>`, so that Gitea can support this URL structure.
* add submodule diff links (#33097)Rowan Bohde2025-01-081-0/+236
This adds links to submodules in diffs, similar to the existing link when viewing a repo at a specific commit. It does this by expanding diff parsing to recognize changes to submodules, and find the specific refs that are added, deleted or changed. Related #25888 --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>