forgejo/modules/repository
Gusted 9f6bffdaf9
[GITEA] Ignore temporary files for directory size
- While looking trough the logs for unrelated things I noticed errors
for directory size calculations in `pushUpdates` that were being caused
by a race condition in which git was making temporary file,
`filepath.WalkDir` noticed that but by the time the second lstat
came(`info.Info()`) it was already gone and it would error.
- Ignore temporary files created by Git.
- There are other cases but much much more rarer and not trivial to detect.

Examples:

...s/repository/push.go:96:pushUpdates() [E] Failed to update size for repository: updateSize: lstat [...]/objects/info/commit-graphs/tmp_graph_Wcy9kR: no such file or directory
...s/repository/push.go:96:pushUpdates() [E] Failed to update size for repository: updateSize: lstat [...]/packed-refs.lock: no such file or directory

(cherry picked from commit 16ce00772d)
2023-11-13 14:09:45 +01:00
..
branch.go
collaborator.go
collaborator_test.go Even more db.DefaultContext refactor (#27352) 2023-10-03 10:30:41 +00:00
commits.go Fix context cache bug & enable context cache for dashabord commits' authors (#26991) 2023-09-11 10:14:01 +00:00
commits_test.go Refactor system setting (#27000) 2023-10-05 09:08:19 +08:00
create.go [GITEA] Ignore temporary files for directory size 2023-11-13 14:09:45 +01:00
create_test.go Move createrepository from module to service layer (#26927) 2023-09-06 12:08:51 +00:00
delete.go Even more db.DefaultContext refactor (#27352) 2023-10-03 10:30:41 +00:00
env.go
fork.go Reduce usage of db.DefaultContext (#27073) 2023-09-14 17:09:32 +00:00
generate.go Move createrepository from module to service layer (#26927) 2023-09-06 12:08:51 +00:00
generate_test.go
hooks.go Move createrepository from module to service layer (#26927) 2023-09-06 12:08:51 +00:00
init.go Move createrepository from module to service layer (#26927) 2023-09-06 12:08:51 +00:00
init_test.go
license.go Move createrepository from module to service layer (#26927) 2023-09-06 12:08:51 +00:00
license_test.go Move createrepository from module to service layer (#26927) 2023-09-06 12:08:51 +00:00
main_test.go make writing main test easier (#27270) 2023-09-28 01:38:53 +00:00
push.go
repo.go Another round of db.DefaultContext refactor (#27103) 2023-09-25 13:17:37 +00:00
temp.go