gitShow static method

Future<String> gitShow(
  1. String ref,
  2. String? root,
  3. String path
)

Implementation

static Future<String> gitShow(String ref, String? root, String path) async {
  final result = await Process.run('git', ['show', '$ref:$path'], workingDirectory: root);
  if (result.exitCode != 0) {
    throw GitException('Failed to show ref $ref:$path: ${result.stderr.toString()}');
  }
  return result.stdout.toString().trim();
}