Currently the API and CLI implement similar functions for transform and git transform. This should be refactored (DRY) and should improve testing.