mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
Restore functionality for early gits (#7775)
* Change tests to make it possible to run TestGit with 1.7.2 * Make merge run on 1.7.2 * Fix tracking and staging branch name problem * Ensure that git 1.7.2 works on tests * ensure that there is no chance for conflicts * Fix-up missing merge issues * Final rm * Ensure LFS filters run on the tests * Do not sign commits from temp repo * Restore tracking fetch change * Apply suggestions from code review * Update modules/repofiles/temp_repo.go
This commit is contained in:
@@ -74,9 +74,12 @@ func UploadRepoFiles(repo *models.Repository, doer *models.User, opts *UploadRep
|
||||
infos[i] = uploadInfo{upload: upload}
|
||||
}
|
||||
|
||||
filename2attribute2info, err := t.CheckAttribute("filter", names...)
|
||||
if err != nil {
|
||||
return err
|
||||
var filename2attribute2info map[string]map[string]string
|
||||
if setting.LFS.StartServer {
|
||||
filename2attribute2info, err = t.CheckAttribute("filter", names...)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
// Copy uploaded files into repository.
|
||||
@@ -88,7 +91,7 @@ func UploadRepoFiles(repo *models.Repository, doer *models.User, opts *UploadRep
|
||||
defer file.Close()
|
||||
|
||||
var objectHash string
|
||||
if filename2attribute2info[uploadInfo.upload.Name] != nil && filename2attribute2info[uploadInfo.upload.Name]["filter"] == "lfs" {
|
||||
if setting.LFS.StartServer && filename2attribute2info[uploadInfo.upload.Name] != nil && filename2attribute2info[uploadInfo.upload.Name]["filter"] == "lfs" {
|
||||
// Handle LFS
|
||||
// FIXME: Inefficient! this should probably happen in models.Upload
|
||||
oid, err := models.GenerateLFSOid(file)
|
||||
|
Reference in New Issue
Block a user