1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2024-12-21 12:44:49 -05:00
forgejo/modules/git
Giteabot 3e091b9bac
Fix IsObjectExist with gogit (#31790) (#31806)
Backport #31790 by @wolfogre

Fix #31271.

When gogit is enabled, `IsObjectExist` calls
`repo.gogitRepo.ResolveRevision`, which is not correct. It's for
checking references not objects, it could work with commit hash since
it's both a valid reference and a commit object, but it doesn't work
with blob objects.

So it causes #31271 because it reports that all blob objects do not
exist.

Co-authored-by: Jason Song <i@wolfogre.com>
(cherry picked from commit 144648a4afdd93d534875a86c50ec61c860878f3)
2024-08-11 09:41:23 +02:00
..
foreachref Use refname:strip-2 instead of refname:short when syncing tags (#28797) 2024-01-16 08:13:07 +01:00
internal Refactor git command package to improve security and maintainability (#22678) 2023-02-04 10:30:43 +08:00
pipeline fix(lfs): gogit /settings/lfs/find 500 error (#3472) 2024-04-26 09:48:22 +00:00
tests/repos [PERFORMANCE] git check-attr on bare repo if supported 2024-03-28 10:52:51 +01:00
url enable linter testifylint on v7 (#4572) 2024-07-30 19:42:06 +00:00
batch_reader.go Discard unread data of git cat-file (#29297) 2024-02-26 22:30:25 +01:00
blame.go Add io.Closer guidelines (#29387) 2024-02-26 22:30:27 +01:00
blame_sha256_test.go enable linter testifylint on v7 (#4572) 2024-07-30 19:42:06 +00:00
blame_test.go enable linter testifylint on v7 (#4572) 2024-07-30 19:42:06 +00:00
blob.go Fix profile render when the README.md size is larger than 1024 bytes (#25131) 2023-06-13 09:02:25 +00:00
blob_gogit.go Abstract hash function usage (#28138) 2023-12-13 21:02:00 +00:00
blob_nogogit.go Do not double close reader (#29354) 2024-02-26 22:30:26 +01:00
blob_test.go enable linter testifylint on v7 (#4572) 2024-07-30 19:42:06 +00:00
command.go Support repo code search without setting up an indexer (#29998) 2024-03-28 05:16:51 +00:00
command_race_test.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
command_test.go enable linter testifylint on v7 (#4572) 2024-07-30 19:42:06 +00:00
commit.go Fix some pending problems (#29985) 2024-03-26 19:04:26 +01:00
commit_convert_gogit.go Include encoding in signature payload (#30174) (#30182) 2024-04-08 11:30:08 +02:00
commit_info.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
commit_info_gogit.go Abstract hash function usage (#28138) 2023-12-13 21:02:00 +00:00
commit_info_nogogit.go Discard unread data of git cat-file (#29297) 2024-02-26 22:30:25 +01:00
commit_info_test.go enable linter testifylint on v7 (#4572) 2024-07-30 19:42:06 +00:00
commit_reader.go Include encoding in signature payload (#30174) (#30182) 2024-04-08 11:30:08 +02:00
commit_sha256_test.go enable linter testifylint on v7 (#4572) 2024-07-30 19:42:06 +00:00
commit_test.go enable linter testifylint on v7 (#4572) 2024-07-30 19:42:06 +00:00
diff.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
diff_test.go enable linter testifylint on v7 (#4572) 2024-07-30 19:42:06 +00:00
error.go Add merge style fast-forward-only (#28954) 2024-02-14 17:19:19 +01:00
git.go Merge pull request '[PERFORMANCE] git check-attr on bare repo if supported' (#2763) from oliverpool/forgejo:check_attr_bare into forgejo 2024-03-28 11:14:52 +00:00
git_test.go enable linter testifylint on v7 (#4572) 2024-07-30 19:42:06 +00:00
grep.go [BUG] Handle bigger files in git grep 2024-04-11 13:32:01 +00:00
grep_test.go enable linter testifylint on v7 (#4572) 2024-07-30 19:42:06 +00:00
hook.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
last_commit_cache.go [GITEA] Drop sha256-simd in favor of stdlib 2024-02-05 16:09:40 +01:00
last_commit_cache_gogit.go Abstract hash function usage (#28138) 2023-12-13 21:02:00 +00:00
last_commit_cache_nogogit.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
log_name_status.go [CLEANUP] make golangci-lint@v1.56.1 happy 2024-02-15 16:19:36 +01:00
notes.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
notes_gogit.go Abstract hash function usage (#28138) 2023-12-13 21:02:00 +00:00
notes_nogogit.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
notes_test.go enable linter testifylint on v7 (#4572) 2024-07-30 19:42:06 +00:00
object_format.go fix: hook post-receive for sha256 repos 2024-05-15 21:08:15 +00:00
object_id.go fix: hook post-receive for sha256 repos 2024-05-15 21:08:15 +00:00
object_id_gogit.go Add support for sha256 repositories (#23894) 2024-01-19 17:05:02 +01:00
object_id_test.go fix: hook post-receive for sha256 repos 2024-05-15 21:08:15 +00:00
object_signature.go Rename CommitGPGSignature to ObjectSignature 2024-03-26 08:09:36 +00:00
parse_gogit.go Improve ObjectFormat interface (#28496) 2023-12-19 07:20:47 +00:00
parse_gogit_test.go enable linter testifylint on v7 (#4572) 2024-07-30 19:42:06 +00:00
parse_nogogit.go Improve ObjectFormat interface (#28496) 2023-12-19 07:20:47 +00:00
parse_nogogit_test.go enable linter testifylint on v7 (#4572) 2024-07-30 19:42:06 +00:00
README.md move code.gitea.io/git to code.gitea.io/gitea/modules/git (#6364) 2019-03-27 17:33:00 +08:00
ref.go Adjust object format interface (#28469) 2023-12-17 11:56:08 +00:00
ref_test.go Use the type RefName for all the needed places and fix pull mirror sync bugs (#24634) 2023-05-26 01:04:48 +00:00
remote.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
repo.go Make "sync branch" also sync object format and add tests (#30878) (#30880) 2024-05-14 15:28:38 +02:00
repo_archive.go Fix archive creating LFS hooks and breaking pull requests (#28848) 2024-01-19 05:49:18 +00:00
repo_attribute.go [v7.0/forgejo] [REFACTOR] git attribute: test proper cancellation and unify nul-byte reader (#2939) 2024-04-01 06:44:46 +00:00
repo_attribute_test.go enable linter testifylint on v7 (#4572) 2024-07-30 19:42:06 +00:00
repo_base.go Simplify how git repositories are opened (#28937) 2024-01-27 21:09:51 +01:00
repo_base_gogit.go Add io.Closer guidelines (#29387) 2024-02-26 22:30:27 +01:00
repo_base_nogogit.go Lazy load object format with command line and don't do it in OpenRepository (#29712) 2024-03-20 08:46:28 +01:00
repo_blame.go Remove git.FileBlame (#25841) 2023-07-12 19:07:29 +02:00
repo_blob.go Improve ObjectFormat interface (#28496) 2023-12-19 07:20:47 +00:00
repo_blob_gogit.go Abstract hash function usage (#28138) 2023-12-13 21:02:00 +00:00
repo_blob_nogogit.go Abstract hash function usage (#28138) 2023-12-13 21:02:00 +00:00
repo_blob_test.go enable linter testifylint on v7 (#4572) 2024-07-30 19:42:06 +00:00
repo_branch.go Move get/set default branch from git package to gitrepo package to hide repopath (#29126) 2024-03-11 23:36:59 +07:00
repo_branch_gogit.go Fix IsObjectExist with gogit (#31790) (#31806) 2024-08-11 09:41:23 +02:00
repo_branch_nogogit.go Fix IsObjectExist with gogit (#31790) (#31806) 2024-08-11 09:41:23 +02:00
repo_branch_test.go Fix IsObjectExist with gogit (#31790) (#31806) 2024-08-11 09:41:23 +02:00
repo_commit.go Lazy load object format with command line and don't do it in OpenRepository (#29712) 2024-03-20 08:46:28 +01:00
repo_commit_gogit.go Lazy load object format with command line and don't do it in OpenRepository (#29712) 2024-03-20 08:46:28 +01:00
repo_commit_nogogit.go Lazy load object format with command line and don't do it in OpenRepository (#29712) 2024-03-20 08:46:28 +01:00
repo_commit_test.go enable linter testifylint on v7 (#4572) 2024-07-30 19:42:06 +00:00
repo_commitgraph.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
repo_commitgraph_gogit.go Update go dependencies and fix go-git (#28893) 2024-01-23 05:40:00 +00:00
repo_compare.go Lazy load object format with command line and don't do it in OpenRepository (#29712) 2024-03-20 08:46:28 +01:00
repo_compare_test.go enable linter testifylint on v7 (#4572) 2024-07-30 19:42:06 +00:00
repo_gpg.go Abstract hash function usage (#28138) 2023-12-13 21:02:00 +00:00
repo_hook.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
repo_index.go Lazy load object format with command line and don't do it in OpenRepository (#29712) 2024-03-20 08:46:28 +01:00
repo_language_stats.go Convert linguist attribute handling to optional.Option 2024-02-26 12:52:59 +01:00
repo_language_stats_gogit.go Correctly support linguist-documentation=false 2024-02-26 14:18:33 +01:00
repo_language_stats_nogogit.go [PERFORMANCE] git check-attr on bare repo if supported 2024-03-28 10:52:51 +01:00
repo_language_stats_test.go enable linter testifylint on v7 (#4572) 2024-07-30 19:42:06 +00:00
repo_object.go Improve ObjectFormat interface (#28496) 2023-12-19 07:20:47 +00:00
repo_ref.go Show branches and tags that contain a commit (#25180) 2023-07-27 12:47:41 +02:00
repo_ref_gogit.go Abstract hash function usage (#28138) 2023-12-13 21:02:00 +00:00
repo_ref_nogogit.go Improve ObjectFormat interface (#28496) 2023-12-19 07:20:47 +00:00
repo_ref_test.go enable linter testifylint on v7 (#4572) 2024-07-30 19:42:06 +00:00
repo_stats.go Fix some pending problems (#29985) 2024-03-26 19:04:26 +01:00
repo_stats_test.go enable linter testifylint on v7 (#4572) 2024-07-30 19:42:06 +00:00
repo_tag.go Rename CommitGPGSignature to ObjectSignature 2024-03-26 08:09:36 +00:00
repo_tag_gogit.go Improve ObjectFormat interface (#28496) 2023-12-19 07:20:47 +00:00
repo_tag_nogogit.go Discard unread data of git cat-file (#29297) 2024-02-26 22:30:25 +01:00
repo_tag_test.go enable linter testifylint on v7 (#4572) 2024-07-30 19:42:06 +00:00
repo_test.go enable linter testifylint on v7 (#4572) 2024-07-30 19:42:06 +00:00
repo_tree.go Improve ObjectFormat interface (#28496) 2023-12-19 07:20:47 +00:00
repo_tree_gogit.go Lazy load object format with command line and don't do it in OpenRepository (#29712) 2024-03-20 08:46:28 +01:00
repo_tree_nogogit.go Lazy load object format with command line and don't do it in OpenRepository (#29712) 2024-03-20 08:46:28 +01:00
signature.go [gitea] Refactor parseSignatureFromCommitLine (#29054) 2024-02-10 10:53:43 +01:00
signature_gogit.go [gitea] Refactor parseSignatureFromCommitLine (#29054) 2024-02-10 10:53:43 +01:00
signature_nogogit.go [gitea] Refactor parseSignatureFromCommitLine (#29054) 2024-02-10 10:53:43 +01:00
signature_test.go [gitea] Refactor parseSignatureFromCommitLine (#29054) 2024-02-10 10:53:43 +01:00
submodule.go Upgrade to golangci-lint@v1.55.0 (#27756) 2023-10-24 02:54:59 +00:00
submodule_test.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
tag.go Rename CommitGPGSignature to ObjectSignature 2024-03-26 08:09:36 +00:00
tag_test.go enable linter testifylint on v7 (#4572) 2024-07-30 19:42:06 +00:00
tree.go Abstract hash function usage (#28138) 2023-12-13 21:02:00 +00:00
tree_blob.go [GITEA] Find README.md for user profiles case insensitively 2024-02-05 16:09:42 +01:00
tree_blob_gogit.go Abstract hash function usage (#28138) 2023-12-13 21:02:00 +00:00
tree_blob_nogogit.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
tree_entry.go [FEAT] Show follow symlink button 2024-03-02 17:58:09 +01:00
tree_entry_gogit.go Abstract hash function usage (#28138) 2023-12-13 21:02:00 +00:00
tree_entry_mode.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
tree_entry_nogogit.go Abstract hash function usage (#28138) 2023-12-13 21:02:00 +00:00
tree_entry_test.go enable linter testifylint on v7 (#4572) 2024-07-30 19:42:06 +00:00
tree_gogit.go Abstract hash function usage (#28138) 2023-12-13 21:02:00 +00:00
tree_nogogit.go Lazy load object format with command line and don't do it in OpenRepository (#29712) 2024-03-20 08:46:28 +01:00
tree_test.go enable linter testifylint on v7 (#4572) 2024-07-30 19:42:06 +00:00
utils.go Replace interface{} with any (#25686) 2023-07-04 18:36:08 +00:00
utils_test.go gofmt-ed modules/git/utils_test.go due to linter 2024-02-24 15:53:38 +01:00

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.