Skip to content

Commit 644367a

Browse files
committed
Update
1 parent 221934a commit 644367a

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

modules/lfs/shared.go

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ package lfs
66
import (
77
"errors"
88
"fmt"
9-
"runtime"
109
"time"
1110

1211
"code.gitea.io/gitea/modules/util"
@@ -17,13 +16,12 @@ const (
1716
MediaType = "application/vnd.git-lfs+json"
1817
// AcceptHeader Some LFS servers offer content with other types, so fallback to '*/*' if application/vnd.git-lfs+json cannot be served
1918
AcceptHeader = "application/vnd.git-lfs+json;q=0.9, */*;q=0.8"
19+
// UserAgentHeader Add User-Agent for gitea's self-implemented lfs client,
20+
// and the version is consistent with the latest version of git lfs can be avoided incompatibilities.
21+
// Some lfs servers will check this
22+
UserAgentHeader = "git-lfs/3.6.0 (Gitea)"
2023
)
2124

22-
// UserAgentHeader Add User-Agent for gitea's self-implemented lfs client,
23-
// and the version is consistent with the latest version of git lfs can be avoided incompatibilities.
24-
// Some lfs servers will check this
25-
var UserAgentHeader = fmt.Sprintf("git-lfs/3.6.0 (Gitea; %s %s; %s)", runtime.GOOS, runtime.GOARCH, runtime.Version())
26-
2725
// BatchRequest contains multiple requests processed in one batch operation.
2826
// https://github.com/git-lfs/git-lfs/blob/main/docs/api/batch.md#requests
2927
type BatchRequest struct {

0 commit comments

Comments
 (0)