Skip to content

Commit bb4f798

Browse files
committed
Use HEAD as tree-ish source for bare repo attributes
1 parent 51aafb4 commit bb4f798

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

services/repository/files/update.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -492,7 +492,7 @@ func CreateOrUpdateFile(ctx context.Context, t *TemporaryUploadRepository, file
492492
var lfsMetaObject *git_model.LFSMetaObject
493493
if setting.LFS.StartServer && hasOldBranch {
494494
// Check there is no way this can return multiple infos
495-
attributesMap, err := attribute.CheckAttributes(ctx, t.gitRepo, "" /* use temp repo's working dir */, attribute.CheckAttributeOpts{
495+
attributesMap, err := attribute.CheckAttributes(ctx, t.gitRepo, "HEAD", attribute.CheckAttributeOpts{
496496
Attributes: []string{attribute.Filter},
497497
Filenames: []string{file.Options.treePath},
498498
})

services/repository/files/upload.go

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

109109
var attributesMap map[string]*attribute.Attributes
110110
if setting.LFS.StartServer {
111-
attributesMap, err = attribute.CheckAttributes(ctx, t.gitRepo, "" /* use temp repo's working dir */, attribute.CheckAttributeOpts{
111+
attributesMap, err = attribute.CheckAttributes(ctx, t.gitRepo, "HEAD", attribute.CheckAttributeOpts{
112112
Attributes: []string{attribute.Filter},
113113
Filenames: names,
114114
})

0 commit comments

Comments
 (0)