The removeNewTemporaryPackFiles cleanup used a set-difference that could capture tmp_pack_* files created by concurrent git operations (e.g. git gc, git repack) that don't hold FETCH_HEAD.lock. Expand the lock check to also detect gc.pid, which git gc creates for the duration of garbage collection.