Skip to content

Commit c4e5c8b

Browse files
committed
Fix upload failing on empty repo
1 parent bb4f798 commit c4e5c8b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

services/repository/files/upload.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ func UploadRepoFiles(ctx context.Context, repo *repo_model.Repository, doer *use
107107
}
108108

109109
var attributesMap map[string]*attribute.Attributes
110-
if setting.LFS.StartServer {
110+
if setting.LFS.StartServer && hasOldBranch {
111111
attributesMap, err = attribute.CheckAttributes(ctx, t.gitRepo, "HEAD", attribute.CheckAttributeOpts{
112112
Attributes: []string{attribute.Filter},
113113
Filenames: names,

0 commit comments

Comments
 (0)