A simple assumption is made about the tags: it's assumed that they come in chronological order, and share the same history (eg. v0.0.1, v0.0.2). That way, to get commits made for v0.0.2, we simply look for history from v0.0.1 to v0.0.2.