This is quite complicated. Where all did it come from? If this is a general requirement of SCMs then I think it should be defined in Jenkins core, not here.