The physics
A driver cell sends a steady current along a long uniform wire. The potential drops evenly along it: k volts per cm.
k = I Rwire / L
A test cell joins the wire's high end A. A galvanometer joins it to the jockey. At the null point, the drop from A to the jockey equals the cell's. No current then flows through the cell.
E = k l
So the potentiometer measures an emf without taking current. With a shunt across the cell, it shows the terminal voltage. That gives the internal resistance.
r = R (l0 / l − 1)