Let $M$ be an analytic manifold and let $\gamma \subset M$ be a geodesic curve and let $f:M \rightarrow \mathbb{R}$ be a non-constant and analytic function.
Prove or disprove that
If $f(\gamma)$ is constant then $f(M)$ is constantm, which implies that $M$ must be constant ?
Thanks in advance.