Every length minimizing $\mathcal C^1$ curve is a geodesic. Let $(M,g)$ a manifold and $\gamma (t)$ for $t\in [a,b]$ a curve $\mathcal C^1$ the is minimizing the length. Then, if $p=\gamma (t_0)$ and $q=\gamma (t_1)$, then $\gamma $ is also minimizing the length of $p$ and $q$ for all $a\leq t_0<t_1\leq b$. In polar coordinates in $B(p,r)$, we have $$\gamma |_{[t_0,t_1]}=(r(t),\gamma ^1(t),...,\gamma ^{n-1}(t))$$
and 
\begin{align*}
d(p,q)&=\ell(\Gamma)|_{[t_0,t_1]}\\
&=\int_{t_0}^{t_1}\|\dot \gamma (t)\|\mathrm d t\\
&=\int_{t_0}^{t_1}\sqrt{\dot r(t)+g_{ij}(\gamma (t))\dot y^i\dot y^j}\mathrm d t\\
&\geq \int_{t_0}^{t_1}\sqrt{\dot r(t)^2}\\
&=r(t_1)-r(t_0)\\
&=d(p,q).
\end{align*}
We have equality if and only if $\dot y^i=0$ for all $i$, i.e. if $y^i=const$, which proves the claim.
Question
I don't understand the proof, why we have show that $\gamma $ is a geodesic ? To me, we only proved that $d(p,q)\geq d(p,q)$ (which is in fact obvious). Any way, any explanation is welcome.

To answer the question why the proof shows that the curve is a geodesic:
Once we prove that $y^i$'s are constant, then $\gamma$ coincides with a radial curve, namely with $t \longrightarrow (t,y^1,...)$ which is by definition of polar coordinates a geodesic.
Therefore, we have shown that small segments (because we restricted ourselves to $p-q$ part) of the curve are geodesics. But this is true of any segment, hence proving that the whole curve is a geodesic.
