How to use the js-git/helpers/serial.js function in js-git

To help you get started, we’ve selected a few js-git examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github creationix / git-browser / src / main-mem.js View on Github external
connection.fetch(config, wrap(function (err, pack) {
  log("onfetch", err, pack);
  if (err) throw err;
  serial(
    parallel(
      repo.importRefs(pack.refs),
      repo.unpack(pack, config)
    ),
    connection.close()
  )(wrap(function (err) {
    if (err) log("FAIL", err);
    else log("DONE");
  }));
}));
github creationix / git-browser / src / main-db.js View on Github external
}, wrap(function (err, result) {
  if (err) throw err;
  serial(
    parallel(
      repo.importRefs(result.pack.refs),
      repo.unpack(result.pack, config)
    ),
    connection.close()
  )(function (err) {
    if (err) throw err;
    log("DONE");
  });
}));
github creationix / git-browser / src / main-fs.js View on Github external
}, wrap(function (err, result) {
    if (err) throw err;
    serial(
      parallel(
        repo.importRefs(result.pack.refs),
        repo.unpack(result.pack, config)
      ),
      connection.close()
    )(function (err) {
      if (err) throw err;
      log("DONE");
    });
  }));
}