Prune outdated refs/tmp references
From gitlab-com/infrastructure#2904, we appear to have over 8,000 temporary references in the GitLab CE repository that probably don't need to be there anymore. This seems to be slowing pushes by 20+ seconds.
As part of our garbage collection process, we should probably remove these if they are older than some time (e.g. a week) because they can significantly affect performance. These refs aren't folded into the packed-refs
file, so each of them will cause an extra stat
and open
system call unnecessarily.
Note that these refs aren't even valid refs; they are empty directories, so there's even more reason to delete them.
Edited by Stan Hu