git-fetch-pack
git's smart fetch pack protocol (the one that
calls upload-pack
on the server).
can be used to download packfiles (fetch or clone!) or to list remote branches.
var net = fs = var gitclient = transport = load = walk =
API
client(hostinfo[, want_function][, have_stream][, capabilities]) -> client duplex stream
create a client for communicating with hostinfo
that uses want_function
to determine which branches to ask for, and can provide a list of already-present
commits using have_stream
.
by providing the want_function
argument (which takes a ref
object and a ready
callback) but no others, you may emulate a git clone
.
by additionally providing a have_stream
(usually using git-walk-refs), you can emulate a git fetch
.
by providing capabilities
, you enable the ability to blow your foot off, mostly; since by default this module does not support either side-band protocol.
Ref objects
"hash": "git hash" "name": "refs/heads/master" // for example "commit": null | "hash" // for annotated tags
want_function
{ // do you want this ref object? // sure do || || // sure don't.}
stream.pack
A readable stream of packfile data.
stream.refs
A readable stream of remote references.
License
MIT