Is your feature request related to a problem? Please describe.
The current implementation of Conf.get_starting_commit() will always insert --ancestry-path to the git rev-list options if a from filter is given, which forces the returned commits to be direct descendants of the specified commit.
This makes it impossible to invoke generic git rev-list behavior such as git rev-list A..B or git rev-list A B ^C using PyDriller repository filters
Describe the solution you'd like
I propose to add filters descendants_of and ancestors_of which accept either a single commit or a list of commits, such that Repository(path, descendatns_of=['A', 'B'], ancestors_of['C', 'D']) results in the behavior git rev-list C D ^A ^B.
Additional context
I would say providing --ancestry-path as the only option is counterintuitive. E.g. I wanted to use pydriller to mine all commits that occurred between two releases R1 and R2 of a project and was puzzled as to why Repository(path, from="R1", to="R2") resulted in empty output, even though git rev-list R1..R2 provided commits. I wonder if some people used these filters without realising how they actually work in PyDriller.
Is your feature request related to a problem? Please describe.
The current implementation of
Conf.get_starting_commit()will always insert--ancestry-pathto thegit rev-listoptions if afromfilter is given, which forces the returned commits to be direct descendants of the specified commit.This makes it impossible to invoke generic
git rev-listbehavior such asgit rev-list A..Borgit rev-list A B ^Cusing PyDriller repository filtersDescribe the solution you'd like
I propose to add filters
descendants_ofandancestors_ofwhich accept either a single commit or a list of commits, such thatRepository(path, descendatns_of=['A', 'B'], ancestors_of['C', 'D'])results in the behaviorgit rev-list C D ^A ^B.Additional context
I would say providing
--ancestry-pathas the only option is counterintuitive. E.g. I wanted to use pydriller to mine all commits that occurred between two releasesR1andR2of a project and was puzzled as to whyRepository(path, from="R1", to="R2")resulted in empty output, even thoughgit rev-list R1..R2provided commits. I wonder if some people used these filters without realising how they actually work in PyDriller.