[PR #3016] [MERGED] Fix git lfs path #16717

Closed
opened 2025-11-02 12:17:09 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/go-gitea/gitea/pull/3016
Author: @sapk
Created: 11/28/2017
Status: Merged
Merged: 11/28/2017
Merged by: @lafriks

Base: masterHead: fix-git-lfs-path


📝 Commits (7)

  • 2f3d2cd add suffix .git
  • b303b27 Remove Content-Type on GET methods
  • 9ac0dda Merge branch 'master' into fix-git-lfs-path
  • 73126ed Add migrations to force creation before any futur potential migration
  • 099b0f4 Merge branch 'fix-git-lfs-path' of ssh://github.com/sapk-fork/gitea into fix-git-lfs-path
  • 58b9bc7 really exec migration
  • 264d496 Merge branch 'master' into fix-git-lfs-path

📊 Changes

5 files changed (+58 additions, -21 deletions)

View changed files

📝 integrations/api_repo_lfs_locks_test.go (+10 -13)
📝 models/migrations/migrations.go (+3 -1)
models/migrations/v49.go (+31 -0)
📝 modules/lfs/locks.go (+13 -6)
📝 routers/routes/routes.go (+1 -1)

📄 Description

After re-testing https://github.com/go-gitea/gitea/pull/2938 and relooking at specs.

Found two errors from me :

All File Locking requests require the following HTTP headers:
Accept: application/vnd.git-lfs+json
Content-Type: application/vnd.git-lfs+json

But git client (at least git version 2.15.0) doesn't send Content-Type: application/vnd.git-lfs+json for GET methods. -> so remove check for it.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/go-gitea/gitea/pull/3016 **Author:** [@sapk](https://github.com/sapk) **Created:** 11/28/2017 **Status:** ✅ Merged **Merged:** 11/28/2017 **Merged by:** [@lafriks](https://github.com/lafriks) **Base:** `master` ← **Head:** `fix-git-lfs-path` --- ### 📝 Commits (7) - [`2f3d2cd`](https://github.com/go-gitea/gitea/commit/2f3d2cd0211effedd996a21adaa31ff66be21a0d) add suffix .git - [`b303b27`](https://github.com/go-gitea/gitea/commit/b303b273c5ecd22862bf436bd9d2dafb1279eb24) Remove Content-Type on GET methods - [`9ac0dda`](https://github.com/go-gitea/gitea/commit/9ac0dda4cd1d890b93a45a25ce082b963b844658) Merge branch 'master' into fix-git-lfs-path - [`73126ed`](https://github.com/go-gitea/gitea/commit/73126ed12c50a998e578565aebe1ecddba859148) Add migrations to force creation before any futur potential migration - [`099b0f4`](https://github.com/go-gitea/gitea/commit/099b0f4cf684b15de06bc68ae46e093d4d47228f) Merge branch 'fix-git-lfs-path' of ssh://github.com/sapk-fork/gitea into fix-git-lfs-path - [`58b9bc7`](https://github.com/go-gitea/gitea/commit/58b9bc752a992812d1c8e4781d8a86a579841587) really exec migration - [`264d496`](https://github.com/go-gitea/gitea/commit/264d496ad61fc6fabed081e72df3a7ede727dd76) Merge branch 'master' into fix-git-lfs-path ### 📊 Changes **5 files changed** (+58 additions, -21 deletions) <details> <summary>View changed files</summary> 📝 `integrations/api_repo_lfs_locks_test.go` (+10 -13) 📝 `models/migrations/migrations.go` (+3 -1) ➕ `models/migrations/v49.go` (+31 -0) 📝 `modules/lfs/locks.go` (+13 -6) 📝 `routers/routes/routes.go` (+1 -1) </details> ### 📄 Description After re-testing https://github.com/go-gitea/gitea/pull/2938 and relooking at specs. Found two errors from me : - Specs indicate : https://github.com/git-lfs/git-lfs/blob/master/docs/api/locking.md > All File Locking requests require the following HTTP headers: > Accept: application/vnd.git-lfs+json > Content-Type: application/vnd.git-lfs+json But git client (at least git version 2.15.0) doesn't send `Content-Type: application/vnd.git-lfs+json` for GET methods. -> so remove check for it. - Path for LFS is `:reponame.git` not `:reponame`. This is also use for batch path https://github.com/git-lfs/git-lfs/blob/master/docs/api/batch.md --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2025-11-02 12:17:09 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#16717