Remove stale worktrees before garbage collection
git 2.15+ fails badly when there are worktrees that reference garbage collected or invalid objects. Squash/rebase often leaves stale worktrees around, so we need to clean them up. This commit deletes worktrees older than 6 hours.
See https://gitlab.com/gitlab-org/gitlab-ce/issues/44100
Closes #1074 (closed)
Edited by GitLab Release Tools Bot