Rework repo updating control flow