simple-git
Advanced tools
Comparing version 0.15.0 to 0.16.0
{ | ||
"name": "simple-git", | ||
"description": "Simple GIT interface for node.js", | ||
"version": "0.15.0", | ||
"version": "0.16.0", | ||
"author": "Steve King <steve@mydev.co>", | ||
@@ -6,0 +6,0 @@ "contributors": [ |
@@ -73,2 +73,4 @@ # Simple Git | ||
``.show([options], handlerFn)`` Show various types of objects, for example the file content at a certain commit. options is the string command you want to run. | ||
`.listRemote([args], handlerFn)` lists remote repositories - there are so many optional arguments in the underlying | ||
@@ -75,0 +77,0 @@ `git ls-remote` call, just supply any you want to use as the optional `args` string. |
@@ -356,2 +356,19 @@ (function () { | ||
/** | ||
* Show various types of objects, for example the file at a certain commit | ||
* | ||
* @param {String} [options] | ||
* @param {Function} [then] | ||
*/ | ||
Git.prototype.show = function(options, then) { | ||
var args = [].slice.call(arguments, 0); | ||
var handler = typeof args[args.length - 1] === "function" ? args.pop() : null; | ||
var show = typeof args[0] === "string" ? args[0] : ''; | ||
return this._run('show ' + show, function(err, data) { | ||
handler && handler(err, !err && data); | ||
}); | ||
}; | ||
/** | ||
* Call a simple function | ||
@@ -379,3 +396,3 @@ * @param {Function} [then] | ||
var command = "log --pretty=format:'%H;%ai;%s%d;%aN;%ae'"; | ||
var opt; | ||
var opt = {}; | ||
@@ -403,3 +420,3 @@ var args = [].slice.call(arguments, 0); | ||
if (options.file) { | ||
if (opt.file) { | ||
command += " --follow " + options.file; | ||
@@ -406,0 +423,0 @@ } |
26481
571
148