Skip to content
11 changes: 8 additions & 3 deletions modules/lfs/shared.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import (
"errors"
"fmt"
"runtime"

Check failure on line 9 in modules/lfs/shared.go

View workflow job for this annotation

GitHub Actions / test-mssql

"runtime" imported and not used

Check failure on line 9 in modules/lfs/shared.go

View workflow job for this annotation

GitHub Actions / backend

"runtime" imported and not used

Check failure on line 9 in modules/lfs/shared.go

View workflow job for this annotation

GitHub Actions / test-pgsql

"runtime" imported and not used

Check failure on line 9 in modules/lfs/shared.go

View workflow job for this annotation

GitHub Actions / test-sqlite

"runtime" imported and not used

Check failure on line 9 in modules/lfs/shared.go

View workflow job for this annotation

GitHub Actions / test-unit

"runtime" imported and not used

Check failure on line 9 in modules/lfs/shared.go

View workflow job for this annotation

GitHub Actions / checks-backend

"runtime" imported and not used

Check failure on line 9 in modules/lfs/shared.go

View workflow job for this annotation

GitHub Actions / test-mysql

"runtime" imported and not used

Check failure on line 9 in modules/lfs/shared.go

View workflow job for this annotation

GitHub Actions / test-e2e

"runtime" imported and not used

Check failure on line 9 in modules/lfs/shared.go

View workflow job for this annotation

GitHub Actions / lint-backend

"runtime" imported and not used) (typecheck)

Check failure on line 9 in modules/lfs/shared.go

View workflow job for this annotation

GitHub Actions / lint-backend

"runtime" imported and not used (typecheck)

Check failure on line 9 in modules/lfs/shared.go

View workflow job for this annotation

GitHub Actions / lint-backend

"runtime" imported and not used) (typecheck)

Check failure on line 9 in modules/lfs/shared.go

View workflow job for this annotation

GitHub Actions / lint-go-gogit

"runtime" imported and not used) (typecheck)

Check failure on line 9 in modules/lfs/shared.go

View workflow job for this annotation

GitHub Actions / lint-go-gogit

"runtime" imported and not used (typecheck)

Check failure on line 9 in modules/lfs/shared.go

View workflow job for this annotation

GitHub Actions / lint-go-gogit

"runtime" imported and not used) (typecheck)

Check failure on line 9 in modules/lfs/shared.go

View workflow job for this annotation

GitHub Actions / lint-go-windows

"runtime" imported and not used) (typecheck)

Check failure on line 9 in modules/lfs/shared.go

View workflow job for this annotation

GitHub Actions / lint-go-windows

"runtime" imported and not used (typecheck)

Check failure on line 9 in modules/lfs/shared.go

View workflow job for this annotation

GitHub Actions / lint-go-windows

"runtime" imported and not used) (typecheck)
"time"

"code.gitea.io/gitea/modules/util"
Expand All @@ -14,11 +15,15 @@
const (
// MediaType contains the media type for LFS server requests
MediaType = "application/vnd.git-lfs+json"
// Some LFS servers offer content with other types, so fallback to '*/*' if application/vnd.git-lfs+json cannot be served
AcceptHeader = "application/vnd.git-lfs+json;q=0.9, */*;q=0.8"
UserAgentHeader = "git-lfs"
// AcceptHeader Some LFS servers offer content with other types, so fallback to '*/*' if application/vnd.git-lfs+json cannot be served
AcceptHeader = "application/vnd.git-lfs+json;q=0.9, */*;q=0.8"
)

// UserAgentHeader Add User-Agent for gitea's self-implemented lfs client,
// and the version is consistent with the latest version of git lfs can be avoided incompatibilities.
// Some lfs servers will check this
var UserAgentHeader = "git-lfs/3.6.0 (Gitea)"

// BatchRequest contains multiple requests processed in one batch operation.
// https://github.com/git-lfs/git-lfs/blob/main/docs/api/batch.md#requests
type BatchRequest struct {
Expand Down
Loading