getFullDiff static method
Get Git full diff. The default targetBranch will be selected based on current environment.
This function needs Git history on the machine.
Implementation
static Future<List<GitDiff>> getFullDiff(
{String sourceBranch = "HEAD", String? targetBranch}) async {
var base = targetBranch ?? '';
if (base.isEmpty) {
base = getTargetBranch();
}
final data = await DangerUtils.spawn('git', arguments: ['diff', base]);
return GitDiffParser.parse(data);
}