pullover
Pull git repos. A counterpart to pushover.
install:
$ npm install pullover
example:
var hook = // listen to github post-commit hooks. pullover = '/tmp/repos'; var http = ; // server for listening for git post-commit hook actionhttp; // payloadhook;
API
var pullover = require('pullover')
var p = pullover(repoDir, opts={autoCreate:true})
var p = pullover(pushover)
Create a new pullover object from the directory repoDir
.
repoDir
should be entirely empty except for git repo directories.
By default, repository targets will be created if they don't exist. You can
disable that behavior with opts.autoCreate
.
Unlike in pushover, all repos are checked-out instead of being bare, at least until someone figures out the "pull" alternative for bare repos for me.
pullover can also accept a pushover, in which case it uses the same configuration (minus checkout).
p.pull(options, )
options can either be
- a github-style "payload" object OR
- an object having the keys
- repo: The name of the repo
- remote: The path of the remote
- branch: The branch to checkout. Defaults to
master
.
Optionally get a callback cb(err)
to be notified when the repository is done
being pulled.
tests:
$ npm test
license:
MIT/X11.