templates / branches--on commit pack-objects: take lock before accessing `remaining` (0c2ad00)
   1: this is just to ensure the directory exists.