Skip to content

Commit b5ddcbc

Browse files
committed
add more comments
1 parent ce7cfe8 commit b5ddcbc

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

services/repository/files/upload.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,12 @@ func UploadRepoFiles(ctx context.Context, repo *repo_model.Repository, doer *use
119119
}
120120

121121
// Copy uploaded files into repository.
122+
// TODO: there is a small problem: when uploading LFS files with ".gitattributes", the "check-attr" runs before this loop,
123+
// so LFS files are not able to be added as LFS objects. Ideally we need to do in 3 steps in the future:
124+
// 1. Add ".gitattributes" to git index
125+
// 2. Run "check-attr" (the previous attribute.CheckAttributes call)
126+
// 3. Add files to git index (this loop)
127+
// This problem is trivial so maybe no need to spend too much time on it at the moment.
122128
for i := range infos {
123129
if err := copyUploadedLFSFileIntoRepository(ctx, &infos[i], attributesMap, t, opts.TreePath); err != nil {
124130
return err

0 commit comments

Comments
 (0)