gitClone method

Future<String> gitClone(
  1. String url, {
  2. String? branch,
  3. int? depth,
  4. bool bare = false,
})

Clones url into the served root, returning the resulting head SHA.

Implementation

Future<String> gitClone(
  String url, {
  String? branch,
  int? depth,
  bool bare = false,
}) async {
  final reply = await _call(
    DriveOp.gitClone,
    fields: {
      'url': url,
      'branch': ?branch,
      'depth': ?depth,
      if (bare) 'bare': true,
    },
  );
  return reply.header['head'] as String;
}