forgejo/modules/git
Gusted b816bf9232 fix: ignore existence of commits for force pushes (#9262)
- Because we wish to show the status of the old and new commit of a force push, ignore that the commit doesn't exist and return a commit with only its ID filled. This is enough to still show the CI status of this commit although the commit itself is no longer reachable.
- Add unit test.
- Add integration test.
- Resolves forgejo/forgejo#9250

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/9262
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Co-authored-by: Gusted <postmaster@gusted.xyz>
Co-committed-by: Gusted <postmaster@gusted.xyz>
2025-09-12 07:27:15 +02:00
..
foreachref
internal
pipeline feat: bump the minimum required Git version from 2.0.0 to 2.34.1 (#8328) 2025-06-29 00:44:18 +02:00
pushoptions feat: AGit push options starting with {base64} are decoded (#8479) 2025-07-10 17:51:19 +02:00
tests/repos feat: introduce global merge message templates (#8347) 2025-07-12 16:00:42 +02:00
url Update module github.com/golangci/golangci-lint/cmd/golangci-lint to v2 (forgejo) (#7367) 2025-03-28 22:22:21 +00:00
batch.go
batch_reader.go
blame.go feat: bump the minimum required Git version from 2.0.0 to 2.34.1 (#8328) 2025-06-29 00:44:18 +02:00
blame_sha256_test.go
blame_test.go
blob.go feat: detect Interlisp sources as text (#8377) 2025-07-02 07:38:46 +02:00
blob_test.go git/blob: GetContentBase64 with fewer allocations and no goroutine (#8297) 2025-06-27 11:22:10 +02:00
command.go
command_race_test.go
command_test.go Update module github.com/golangci/golangci-lint/cmd/golangci-lint to v2 (forgejo) (#7367) 2025-03-28 22:22:21 +00:00
commit.go git/commit: re-implement submodules file reader (#8438) 2025-07-15 00:20:00 +02:00
commit_info.go git/commit: re-implement submodules file reader (#8438) 2025-07-15 00:20:00 +02:00
commit_info_test.go
commit_reader.go fix: parse change-id in the git commit header (#7884) 2025-05-16 21:14:41 +00:00
commit_sha256_test.go Update module github.com/golangci/golangci-lint/cmd/golangci-lint to v2 (forgejo) (#7367) 2025-03-28 22:22:21 +00:00
commit_test.go git/commit: re-implement submodules file reader (#8438) 2025-07-15 00:20:00 +02:00
diff.go
diff_compare.go feat: improve checking if diffs differ (#8451) 2025-07-16 18:19:27 +02:00
diff_compare_test.go feat: improve checking if diffs differ (#8451) 2025-07-16 18:19:27 +02:00
diff_test.go Update module github.com/golangci/golangci-lint/cmd/golangci-lint to v2 (forgejo) (#7367) 2025-03-28 22:22:21 +00:00
error.go Update module github.com/golangci/golangci-lint/cmd/golangci-lint to v2 (forgejo) (#7367) 2025-03-28 22:22:21 +00:00
git.go feat: bump the minimum required Git version from 2.0.0 to 2.34.1 (#8328) 2025-06-29 00:44:18 +02:00
git_test.go feat: bump the minimum required Git version from 2.0.0 to 2.34.1 (#8328) 2025-06-29 00:44:18 +02:00
grep.go fix(ui): restore code search types (#9053) 2025-08-29 18:56:54 +02:00
grep_test.go fix: make test suite run on older git version (#8188) 2025-06-14 19:50:58 +02:00
hook.go
last_commit_cache.go
log_name_status.go Update module github.com/golangci/golangci-lint/cmd/golangci-lint to v2 (forgejo) (#7367) 2025-03-28 22:22:21 +00:00
notes.go
notes_test.go
object_format.go
object_id.go
object_id_test.go
object_signature.go
parse.go fix: do better parsing of file modes (#9161) 2025-09-04 21:58:12 +02:00
parse_test.go fix: do better parsing of file modes (#9161) 2025-09-04 21:58:12 +02:00
README.md
ref.go
ref_test.go
remote.go feat: bump the minimum required Git version from 2.0.0 to 2.34.1 (#8328) 2025-06-29 00:44:18 +02:00
repo.go fix: use credentials helpers for git clones 2025-08-30 08:52:15 +02:00
repo_archive.go
repo_attribute.go chore(cleanup): replaces unnecessary calls to formatting functions by non-formatting equivalents (#7994) 2025-05-29 17:34:29 +02:00
repo_attribute_test.go chore: use standard library function (#8334) 2025-06-29 08:06:38 +02:00
repo_base.go
repo_base_test.go Update module github.com/golangci/golangci-lint/cmd/golangci-lint to v2 (forgejo) (#7367) 2025-03-28 22:22:21 +00:00
repo_blame.go chore: refactor LineBlame (#8419) 2025-07-05 16:31:53 +02:00
repo_blame_test.go chore: refactor LineBlame (#8419) 2025-07-05 16:31:53 +02:00
repo_blob_test.go
repo_branch.go chore: Refactor Is{Reference,Branch}Exist (#8425) 2025-07-06 07:16:43 +02:00
repo_branch_test.go chore: Refactor Is{Reference,Branch}Exist (#8425) 2025-07-06 07:16:43 +02:00
repo_commit.go fix: ignore existence of commits for force pushes (#9262) 2025-09-12 07:27:15 +02:00
repo_commit_test.go fix: ignore existence of commits for force pushes (#9262) 2025-09-12 07:27:15 +02:00
repo_commitgraph.go feat: bump the minimum required Git version from 2.0.0 to 2.34.1 (#8328) 2025-06-29 00:44:18 +02:00
repo_compare.go fix: correctly get stats for API commits (#8756) 2025-08-02 13:06:04 +02:00
repo_compare_test.go fix: correctly get stats for API commits (#8756) 2025-08-02 13:06:04 +02:00
repo_gpg.go
repo_hook.go
repo_index.go
repo_language_stats.go fix: use linguist-generated for language stats (#7685) 2025-04-27 23:29:21 +00:00
repo_language_stats_test.go fix: use linguist-generated for language stats (#7685) 2025-04-27 23:29:21 +00:00
repo_object.go
repo_ref.go Update module github.com/golangci/golangci-lint/cmd/golangci-lint to v2 (forgejo) (#7367) 2025-03-28 22:22:21 +00:00
repo_ref_test.go
repo_stats.go
repo_stats_test.go Update module github.com/golangci/golangci-lint/cmd/golangci-lint to v2 (forgejo) (#7367) 2025-03-28 22:22:21 +00:00
repo_tag.go
repo_tag_test.go Update module github.com/golangci/golangci-lint/cmd/golangci-lint to v2 (forgejo) (#7367) 2025-03-28 22:22:21 +00:00
repo_test.go chore: add clone credential unit test 2025-08-30 08:52:20 +02:00
repo_tree.go Update module github.com/golangci/golangci-lint/cmd/golangci-lint to v2 (forgejo) (#7367) 2025-03-28 22:22:21 +00:00
signature.go
signature_test.go Update module github.com/golangci/golangci-lint/cmd/golangci-lint to v2 (forgejo) (#7367) 2025-03-28 22:22:21 +00:00
submodule.go git/commit: re-implement submodules file reader (#8438) 2025-07-15 00:20:00 +02:00
submodule_test.go git/commit: re-implement submodules file reader (#8438) 2025-07-15 00:20:00 +02:00
tag.go
tag_test.go Update module github.com/golangci/golangci-lint/cmd/golangci-lint to v2 (forgejo) (#7367) 2025-03-28 22:22:21 +00:00
tree.go
tree_blob.go git/commit: re-implement submodules file reader (#8438) 2025-07-15 00:20:00 +02:00
tree_entry.go git/commit: re-implement submodules file reader (#8438) 2025-07-15 00:20:00 +02:00
tree_entry_mode.go
tree_test.go Update module github.com/golangci/golangci-lint/cmd/golangci-lint to v2 (forgejo) (#7367) 2025-03-28 22:22:21 +00:00
utils.go
utils_test.go

Git Module

This module is merged from https://github.com/go-gitea/git which is a Go module to access Git through shell commands. Now it's a part of gitea's main repository for easier pull request.