writeIndex method

Future<void> writeIndex(
  1. GitIndex index
)

Implementation

Future<void> writeIndex(GitIndex index) async {
  var path = p.join(gitDir, 'index.new');
  var file = fs.file(path);
  await file.writeAsBytes(index.serialize());
  await file.rename(p.join(gitDir, 'index'));
}