will resolve or reject when the server closes or fails to close.
- new Git(repoDir, options) → {Git}
+ new Git(repoDir, options)
@@ -65,7 +65,7 @@ new GitSource:
@@ -105,49 +105,7 @@ new Git
- events
repos.on('push', function (push) { ... }
Emitted when somebody does a git push
to the repo.
- Exactly one listener must call push.accept()
or push.reject()
. If there are
- no listeners, push.accept()
is called automatically.
- push
is an http duplex object (see below) with these extra properties:
-push.repo
-push.commit
-push.branch
-repos.on('tag', function (tag) { ... }
Emitted when somebody does a git push --tags
to the repo.
- Exactly one listener must call tag.accept()
or tag.reject()
. If there are
- no listeners, tag.accept()
is called automatically.
- tag
is an http duplex object (see below) with these extra properties:
-tag.repo
-tag.commit
-tag.version
-repos.on('fetch', function (fetch) { ... }
Emitted when somebody does a git fetch
to the repo (which happens whenever you
- do a git pull
or a git clone
).
- Exactly one listener must call fetch.accept()
or fetch.reject()
. If there are
- no listeners, fetch.accept()
is called automatically.
- fetch
is an http duplex objects (see below) with these extra properties:
-fetch.repo
-fetch.commit
-repos.on('info', function (info) { ... }
Emitted when the repo is queried for info before doing other commands.
- Exactly one listener must call info.accept()
or info.reject()
. If there are
- no listeners, info.accept()
is called automatically.
- info
is an http duplex object (see below) with these extra properties:
-info.repo
-repos.on('head', function (head) { ... }
Emitted when the repo is queried for HEAD before doing other commands.
- Exactly one listener must call head.accept()
or head.reject()
. If there are
- no listeners, head.accept()
is called automatically.
- head
is an http duplex object (see below) with these extra properties:
-head.repo
-push.on('response', function(response, done) { ... })
Emitted when node-git-server creates a response stream that will be sent to the git client on the other end.
- This should really only be used if you want to send verbose or error messages to the remote git client.
- response
is a writable stream that can accept buffers containing git packfile sidechannel transfer protocol encoded strings. done
is a callback that must be called when you want to end the response.
- If you create a response listener then you must either call the done
function or execute the following end sequence when you want to end the response:
- response.queue(new Buffer('0000'))
- response.queue(null)
If you never use the response event then the above data will be sent by default. Binding a listener to the response event will prevent the end sequence those from being sent, so you must send them yourself after sending any other messages.
-http duplex objects
The arguments to each of the events 'push'
, 'fetch'
, 'info'
, and 'head'
are http duplex that act as both http
- server request and http server response objects so you can pipe to and from them.
- For every event if there are no listeners dup.accept()
will be called
- automatically.
-dup.accept()
Accept the pending request.
-dup.reject()
Reject the pending request.
+ Handles invoking the git-*-pack binaries
new Git
- events
repos.on('push', function (push) { ... }
Emitted when somebody does a git push
to the repo.
- Exactly one listener must call push.accept()
or push.reject()
. If there are
- no listeners, push.accept()
is called automatically.
- push
is an http duplex object (see below) with these extra properties:
-push.repo
-push.commit
-push.branch
-repos.on('tag', function (tag) { ... }
Emitted when somebody does a git push --tags
to the repo.
- Exactly one listener must call tag.accept()
or tag.reject()
. If there are
- no listeners, tag.accept()
is called automatically.
- tag
is an http duplex object (see below) with these extra properties:
-tag.repo
-tag.commit
-tag.version
-repos.on('fetch', function (fetch) { ... }
Emitted when somebody does a git fetch
to the repo (which happens whenever you
- do a git pull
or a git clone
).
- Exactly one listener must call fetch.accept()
or fetch.reject()
. If there are
- no listeners, fetch.accept()
is called automatically.
- fetch
is an http duplex objects (see below) with these extra properties:
-fetch.repo
-fetch.commit
-repos.on('info', function (info) { ... }
Emitted when the repo is queried for info before doing other commands.
- Exactly one listener must call info.accept()
or info.reject()
. If there are
- no listeners, info.accept()
is called automatically.
- info
is an http duplex object (see below) with these extra properties:
-info.repo
-repos.on('head', function (head) { ... }
Emitted when the repo is queried for HEAD before doing other commands.
- Exactly one listener must call head.accept()
or head.reject()
. If there are
- no listeners, head.accept()
is called automatically.
- head
is an http duplex object (see below) with these extra properties:
-head.repo
-push.on('response', function(response, done) { ... })
Emitted when node-git-server creates a response stream that will be sent to the git client on the other end.
- This should really only be used if you want to send verbose or error messages to the remote git client.
- response
is a writable stream that can accept buffers containing git packfile sidechannel transfer protocol encoded strings. done
is a callback that must be called when you want to end the response.
- If you create a response listener then you must either call the done
function or execute the following end sequence when you want to end the response:
- response.queue(new Buffer('0000'))
- response.queue(null)
If you never use the response event then the above data will be sent by default. Binding a listener to the response event will prevent the end sequence those from being sent, so you must send them yourself after sending any other messages.
-http duplex objects
The arguments to each of the events 'push'
, 'fetch'
, 'info'
, and 'head'
are http duplex that act as both http
- server request and http server response objects so you can pipe to and from them.
- For every event if there are no listeners dup.accept()
will be called
- automatically.
-dup.accept()
Accept the pending request.
-dup.reject()
Reject the pending request.
+ Handles invoking the git-*-pack binaries
git push
to the repo.push.accept()
or push.reject()
. If there are
- no listeners, push.accept()
is called automatically.push
is an http duplex object (see below) with these extra properties:
-push.repo
-push.commit
-push.branchgit push --tags
to the repo.tag.accept()
or tag.reject()
. If there are
- no listeners, tag.accept()
is called automatically.tag
is an http duplex object (see below) with these extra properties:
-tag.repo
-tag.commit
-tag.versiongit fetch
to the repo (which happens whenever you
- do a git pull
or a git clone
).fetch.accept()
or fetch.reject()
. If there are
- no listeners, fetch.accept()
is called automatically.fetch
is an http duplex objects (see below) with these extra properties:
-fetch.repo
-fetch.commitinfo.accept()
or info.reject()
. If there are
- no listeners, info.accept()
is called automatically.info
is an http duplex object (see below) with these extra properties:
-info.repohead.accept()
or head.reject()
. If there are
- no listeners, head.accept()
is called automatically.head
is an http duplex object (see below) with these extra properties:
-head.reporesponse
is a writable stream that can accept buffers containing git packfile sidechannel transfer protocol encoded strings. done
is a callback that must be called when you want to end the response.done
function or execute the following end sequence when you want to end the response: response.queue(new Buffer('0000'))
- response.queue(null)
'push'
, 'fetch'
, 'info'
, and 'head'
are http duplex that act as both http
- server request and http server response objects so you can pipe to and from them.dup.accept()
will be called
- automatically.