ensure commits only happen once