-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Fix git lfs path #3016
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix git lfs path #3016
Conversation
LGTM |
Codecov Report
@@ Coverage Diff @@
## master #3016 +/- ##
==========================================
+ Coverage 33.01% 33.01% +<.01%
==========================================
Files 269 270 +1
Lines 39492 39512 +20
==========================================
+ Hits 13039 13046 +7
- Misses 24603 24617 +14
+ Partials 1850 1849 -1
Continue to review full report at Codecov.
|
LGTM |
@sapk you are also missing migration step to add new lock table that could cause problems later if upgrading from <1.3 to something newer where is migration step that changes lock table |
@lafriks Shouldn't https://github.com/go-gitea/gitea/blob/master/models/models.go#L120 will automatically create the table if not exist ? |
@sapk yes it will but if you add migration that touches or uses table that still does not exists (like upgrading from version where such table did not exist) that migration will fail as tables are sync2'ed (created) after migrations has run |
"github.com/go-xorm/xorm" | ||
) | ||
|
||
func addLFSLock(x *xorm.Engine) error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sapk you are not calling this function from migrations.go
@lafriks I better understand. I remember now also problems when the struct was updated and depending of version installed previously users suffer random bug. Good catch and done. |
I need sleep ^^. Should be good. |
After re-testing #2938 and relooking at specs.
Found two errors from me :
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.:reponame.git
not:reponame
.This is also use for batch path https://github.com/git-lfs/git-lfs/blob/master/docs/api/batch.md