nothingStaged function

Future<bool> nothingStaged()

Return true if no files are staged in git.

Implementation

Future<bool> nothingStaged() async {
  final result = await Process.run('git', ['diff', '--cached', '--exit-code']);
  return result.exitCode == 0;
}