Do metrics which agree on curvature everywhere give same geodesics? In page-38 of Visual Differential Geometry by Tristan Needham, the following equation for the metric-curvature formula is introduced:
$$ \kappa= - \frac{1}{AB} \left[ \partial_v \left[ \frac{\partial_v A}{B} \right]  + \partial_u \left[ \frac{\partial_v B}{A} \right] \right] \tag{1}$$
For a metric:
$$ ds^2 = A^2 du^2 + B dv^2$$
For example,
ne can show through (1) that the metric $ds^2 = dr^2 + r^2 d \theta^2$ and $ ds^2 = dx^2 + dy^2$ correspond to zero curvature i.e: a flat space.
My question is, if we have two metrics who agree whose  curvature evaluated by (1) agrees everywhere, will shortest path between two points in the manifold also match?
For example, in the two examples I gave, we can verify that whatever coordinates we put on the cartesian grid, we find that straight line is shortest distance between points. But is this generally true that just by metric's curvature agreeing, the straight line/ geodesic looks same?

For a person who found this question by search, I would suggest reading this wikipedia article of a related topic known as Einstein's hole arguement.
 A: There are manifolds which have two (actually, infinitely many) metrics with the same curvature, but different geodesics. For example, this answer describes  a "short cylinder" $\mathbb{S}^1 \times [0,1]$ and a "long cylinder" $\mathbb{S}^1 \times [0,10^{10}]$, each with a spherical cap on their ends. Call the rounded short cylinder $M_1$ and the rounded long cylinder $M_2$. The cylindrical parts of $M_1$ and $M_2$ have curvature 0. As discussed in that answer, you can find a curvature-preserving diffeomorphism $\phi:M_1 \to M_2$, by keeping the ends the same and shrinking the distances parallel to the cylinder in the middle. You can define a pullback metric on $M_1$ by $dist(x,y):=dist(\phi(x),\phi(y))$, i.e. you can a metric on $M_1$ in terms of the distances between the images of points on $M_2$ under $\phi$. Then these two different metrics have the same curvature. But the geodesics between points at opposite ends and on opposite sides of the cylinders will be different: the geodesic under the $M_2$ metric will "rotate around the cylinder" almost entirely in the middle section, while the the geodesic under the $M_1$ metric will "rotate" in the normal way.
