simple-git
Advanced tools
Comparing version 0.4.0 to 0.5.0
{ | ||
"name": "simple-git", | ||
"description": "Simple GIT interface for node.js", | ||
"version": "0.4.0", | ||
"version": "0.5.0", | ||
"author": "Steve King <steve@mydev.co>", | ||
@@ -6,0 +6,0 @@ "contributors": [ |
@@ -28,3 +28,3 @@ # Simple Git | ||
`.pull(handlerFn)` pull all updates from the repo | ||
`.pull(remote, branch, handlerFn)` pull all updates from the repo ('origin'/'master') | ||
@@ -31,0 +31,0 @@ `.fetch(remote, branch, handlerFn)` update the local working copy database with changes from a remote repo |
@@ -88,7 +88,16 @@ (function() { | ||
* Pull the updated contents of the current repo | ||
* | ||
* @param {String} [remote] | ||
* @param {String} [branch] | ||
* @param {Function} [then] | ||
*/ | ||
Git.prototype.pull = function(then) { | ||
return this._run('git pull', function(err, data) { | ||
Git.prototype.pull = function(remote, branch, then) { | ||
var command = "git pull"; | ||
if (typeof remote === 'string' && typeof branch === 'string') { | ||
command += ' "' + remote + '" "' + branch + '"'; | ||
} | ||
if (typeof arguments[arguments.length - 1] === 'function') { | ||
then = arguments[arguments.length - 1]; | ||
} | ||
return this._run(command, function(err, data) { | ||
then && then(err, !err && this._parsePull(data)); | ||
@@ -95,0 +104,0 @@ }); |
15639
357
5