There are a number of issues with such an API enhancement:
1. There are going to be SCM implementations that cannot resolve such a concept (e.g. CVS for one)
2. What you are trying to get to is the previous relevant build... which with the multi-branch project type is almost always the previous build on the branch... so JENKINS-13056 is actually solved by multi-branch project type.
3. The previous commit may not have a build associated with it... so then the API would need to give you a means to keep walking up previous commits... which need not be a single path
However I will see if there is something that can be added to resolve such concepts even if they are flawed
There are a number of issues with such an API enhancement:
1. There are going to be SCM implementations that cannot resolve such a concept (e.g. CVS for one)
2. What you are trying to get to is the previous relevant build... which with the multi-branch project type is almost always the previous build on the branch... so
JENKINS-13056is actually solved by multi-branch project type.3. The previous commit may not have a build associated with it... so then the API would need to give you a means to keep walking up previous commits... which need not be a single path
However I will see if there is something that can be added to resolve such concepts even if they are flawed