Let $(M,g)$ be a connected Riemannian manifold. I'm trying to prove that the metric $g$ is flat if and only if the restricted holonomy group $\mathrm{Hol}^0(p)$ is trivial for some $p \in M$. Here, the restricted holonomy group is defined by $$ \mathrm{Hol}^0(p) = \left\{P^\gamma \in \mathrm{O}(T_pM) : P^\gamma \textrm{ is parallel transport of retractible loop } \gamma \right\} $$ I have part of the forward direction: if $g$ is flat, then for each $p \in M$ there's a coordinate chart $(U,\phi)$ centered at $p$ with $\phi : U \to \phi(U)$ is an isometry. In particular, the coordinate frame is orthonormal, so the Christoffel symbols of the Levi-Civita connection are all $0$, so for any loop in $U$, every parallel vector field along the curve has constant coefficients, so parallel transport is trivial when restricted to loops in the coordinate neighborhood. But I'm not sure how to extend this to an arbitrary retractible loop.
The backwards direction I'm pretty lost on. Having a lot of trouble constructing an explicit local isometry $\phi : U \to M$ in a coordinate neighborhood $U$. Help is appreciated!