revList method
Implementation
Future<List<Commit>> revList(String revision, {bool firstParentOnly = false}) async {
// use commit date not author date. commit date is the one between the prev and next commit. Author date could be anything
final String? result = await _git(
'rev-list --pretty=%ct%n${firstParentOnly ? ' --first-parent' : ''} $revision',
emptyResultIsError: false,
);
if (result == null) return [];
return result.split('\n\n').where((c) => c.isNotEmpty).map((rawCommit) {
final lines = rawCommit.split('\n');
return Commit(lines[0].replaceFirst('commit ', ''), lines[1]);
}).toList(growable: false);
}