aboutsummaryrefslogtreecommitdiffstats
path: root/modules/git/object_id.go
diff options
context:
space:
mode:
authorwxiaoguang <wxiaoguang@gmail.com>2024-05-07 00:34:16 +0800
committerGitHub <noreply@github.com>2024-05-06 18:34:16 +0200
commit7c613f100e032f821df88a75954fc50b1cf2f926 (patch)
tree18f73e576eb62a593395919b765e7583f1a1ba06 /modules/git/object_id.go
parent8e8ca6c6530e49e39f970bdfa84716ffda8973d0 (diff)
downloadgitea-7c613f100e032f821df88a75954fc50b1cf2f926.tar.gz
gitea-7c613f100e032f821df88a75954fc50b1cf2f926.zip
Make sure git version&feature are always prepared (#30877)
Otherwise there would be more similar issues like #29287
Diffstat (limited to 'modules/git/object_id.go')
-rw-r--r--modules/git/object_id.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/git/object_id.go b/modules/git/object_id.go
index 33e5085005..82d30184df 100644
--- a/modules/git/object_id.go
+++ b/modules/git/object_id.go
@@ -54,7 +54,7 @@ func (*Sha256Hash) Type() ObjectFormat { return Sha256ObjectFormat }
func NewIDFromString(hexHash string) (ObjectID, error) {
var theObjectFormat ObjectFormat
- for _, objectFormat := range SupportedObjectFormats {
+ for _, objectFormat := range DefaultFeatures().SupportedObjectFormats {
if len(hexHash) == objectFormat.FullLength() {
theObjectFormat = objectFormat
break