Technically, your sprint is everlasting, your stamina is not. If you are hit by an opponent while on no stamina you will be immediately dismounted. If you have stamina left, you will stay on the mount.
Inb4 all other comments saying same thing - been this way since beta
Don't ask ZOS to 'fix' it or we'll likely get the invisible stumbles back again, when horses would crash to a stop over the tiniest of ground pebbles or slopes.
Warmount passive is only infinite while out of combat but yes while you hold down sprint you can technically sprint forever while out of stamina until you release the forward key.