get commits in range