checkHasChange static method

Future<bool> checkHasChange(
  1. String pathRep
)

检测是否含有变动

pathRep 仓库

Implementation

static Future<bool> checkHasChange(String pathRep) async {
  const cmdStatus = 'git status -s';
  final res = await ProcessUtil.runCmdWait(
    cmd: cmdStatus,
    workingDirectory: pathRep,
  );
  if (res.stdout is String) {
    return (res.stdout as String).isNotEmpty;
  }
  return false;
}