Only commit if really necessary