foreach commit