Description
This issue comes from TINKERPOP-2481 where it was originally noted that perhaps IdentityRemovalStrategy had something to do with the following:
gremlin> g.V().match(__.as("a").out("knows").as("b")).identity() ==>[] ==>[] gremlin> g.withStrategies(IdentityRemovalStrategy.instance()).V().match(__.as("a").out("knows").as("b")).identity() ==>[a:v[1],b:v[2]] ==>[a:v[1],b:v[4]] gremlin> g.withoutStrategies(PathRetractionStrategy).V().match(__.as("a").out("knows").as("b")).identity() ==>[a:v[1],b:v[2]] ==>[a:v[1],b:v[4]] gremlin> g.V().match(__.as("a").out("knows").as("b")).unfold() gremlin> g.V().match(__.as("a").out("knows").as("b")).unfold().path() ==>[v[1],v[1],v[2],[a:v[1],b:v[2]],a=v[1]] ==>[v[1],v[1],v[2],[a:v[1],b:v[2]],b=v[2]] ==>[v[1],v[1],v[4],[a:v[1],b:v[4]],a=v[1]] ==>[v[1],v[1],v[4],[a:v[1],b:v[4]],b=v[4]]
but it is not a good idea to fix the behavior of one strategy by way of another so PathRetractionStrategy needs to get a bit smarter.