Files
Zhaowei Gu de28726658 test: fix unit tests on git older than 2.42 (#40557)
Gitea supports git 2.34 and newer, but with git 2.34.1 `go test
./modules/git/` panics in `TestReadingBlameOutput/sha256` (nil pointer
dereference), which aborts the rest of the package, and `services/pull`
fails its `*-MergeTree` cases with `exit status 129`. These tests use
sha256 repositories, `cat-file --batch-command` and `merge-tree
--write-tree`, which production code only uses when `DefaultFeatures()`
says git is new enough (2.42, 2.36 and 2.40).

Those cases now skip on the same `DefaultFeatures()` flags, as the
check-attr tests in `modules/git/attribute` already do. With git 2.34.1
both packages failed before; now they pass with those cases skipped, and
`make test-backend` passes as a whole. With git 2.42.0, 2.43.0 and
2.56.1 nothing is skipped; with 2.41.3 only the sha256 cases are.

Related: https://github.com/go-gitea/gitea/pull/39565

Assisted-by: Hermes Agent:claude-opus-5-5
2026-11-27 12:53:33 +00:00
..
2026-11-26 10:50:01 +00:00
2026-10-24 13:48:19 +00:00
2026-10-24 13:48:19 +00:00
2026-11-26 10:50:01 +00:00
2026-11-26 10:50:01 +00:00
2026-08-26 19:32:44 +00:00
2026-11-26 10:50:01 +00:00
2026-07-12 17:14:09 +00:00
2026-11-26 10:50:01 +00:00
2026-10-24 13:48:19 +00:00