Sorry, but I do not think that the shown code in the OP is correct.
a) An axis-angle rotation is another rotation representation than a quaternion. The glm::rotate function expects an angle (2nd argument) and axis (3rd argument), but not a quaternion. (It is in general a mistake to try to understand a quaternion in geometric terms like angle and axis.)
b) The line
float cos2a = glm::dot(ab_start, ab_curr);
computes the cosine between the two vectors weighted by the product of the lengths of the 2 vectors, accordingly to
a . b = |a| * |b| * cos( <a,b> )
Your code line uses the equivalent form
cos2a := cos( <a,b> ) = ( a . b ) / ( |a| * |b| )
Now, the name cos2a is mistakable. Does it mean cos2(a) or cos(2*a) or what? It is further not obvious from our code snippet whether or not the 2 vectors are normalized. I assume that they are and that you actually want to compute
cos_ab := cos( <a,b> ) = ( a . b ) w/ |a| = |b| = 1
c) The code line
float angle = glm::degrees(glm::acos(cos2a));
transforms the angle between the 2 vectors from radiant to degree. However, the result is ignored in the following, although it would be an expected 2nd argument for glm::rotate.
d) The code line
float sina = sqrt((1.0 - cos2a)*0.5);
… well, I thought the basic formula were the trigonometric Pythagoras
sin2(a) + cos2(a) = 1
but then one gets
sin(a) = sqrt( 1 - cos2(a) )
This could mean that the name cos2a actually means the square cosine, but, as already written, those variable does not store the square value. But even then, where does the factor 0.5 comes from?
e) The code line
float cosa = sqrt((1.0 + cos2a)*0.5);
is even more nebulous to me.
f) The code line
glm::vec3 cross = glm::normalize(glm::cross(ab_start, ab_curr))*sina;
computes a vector that stores the imaginary parts of a quaternion (assuming that sina is calculated correctly as the sine of the angle between the 2 vectors). Naming this vector "cross" is misleading, though.
g) The code line
ab_next *= glm::cross(ab_next, glm::rotate(ab_next,cosa,cross));
does something I'm not sure about. First of, the invocation of glm::rotate uses wrong arguments. The function in question is IMO those documented as "Rotate a three dimensional vector around an axis." Then its 2nd parameter need to be an angle in degree (e.g. your variable "angle" would fit), but you use a cosine of an angle (the real part of a quaternion, by the way)!? And the 3rd parameter should be an axis but you put in the imaginary parts of a quaternion!?
When the parameters of glm::rotate would be correct, then the vector ab_next would be rotated analogously to the rotation from ab_start to ab_curr simply due to glm::rotate. What purpose has the remaining of that code line?