getIsClean function
Check if the working tree is clean.
Implementation
Future<bool> getIsClean({String? cwd, bool ignoreUntracked = false}) async {
final args = ['--no-optional-locks', 'status', '--porcelain'];
if (ignoreUntracked) args.add('-uno');
final result = await _runGit(args, cwd: cwd);
return result.stdout.trim().isEmpty;
}