aboutsummaryrefslogtreecommitdiffstats
path: root/modules/git/ref.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2023-12-17 19:56:08 +0800
committerGitHub <noreply@github.com>2023-12-17 11:56:08 +0000
commit408a4842240e7dd906e682196bd4254d6c76fcb9 (patch)
treeec3962d5769a5891a24b4d79f725673fc1e46e35 /modules/git/ref.go
parent7fb6b5147038649bfaa26147a6173cf99b322a30 (diff)
downloadgitea-408a4842240e7dd906e682196bd4254d6c76fcb9.tar.gz
gitea-408a4842240e7dd906e682196bd4254d6c76fcb9.zip
Adjust object format interface (#28469)
- Remove `ObjectFormatID` - Remove function `ObjectFormatFromID`. - Use `Sha1ObjectFormat` directly but not a pointer because it's an empty struct. - Store `ObjectFormatName` in `repository` struct
Diffstat (limited to 'modules/git/ref.go')
-rw-r--r--modules/git/ref.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/git/ref.go b/modules/git/ref.go
index b96b4ababb..ed801f20d5 100644
--- a/modules/git/ref.go
+++ b/modules/git/ref.go
@@ -205,7 +205,7 @@ func RefURL(repoURL, ref string) string {
return repoURL + "/src/branch/" + refName
case refFullName.IsTag():
return repoURL + "/src/tag/" + refName
- case !ObjectFormatFromID(Sha1).IsValid(ref):
+ case !Sha1ObjectFormat.IsValid(ref):
// assume they mean a branch
return repoURL + "/src/branch/" + refName
default: