If the metric is not flat, then the covariant derivative does not commute. Generally speaking, in curved spaces the order in which the covariant derivatives are taken *does* matter (they do not commute). Perhaps I am mistaken, but my understanding is that the Riemann tensor actually gives us...