Socket
Socket
Sign inDemoInstall

simple-git

Package Overview
Dependencies
Maintainers
1
Versions
259
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

simple-git - npm Package Compare versions

Comparing version 1.10.0 to 1.11.0

2

package.json
{
"name": "simple-git",
"description": "Simple GIT interface for node.js",
"version": "1.10.0",
"version": "1.11.0",
"author": "Steve King <steve@mydev.co>",

@@ -6,0 +6,0 @@ "contributors": [

@@ -81,3 +81,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.
`.show([options], handlerFn)` Show various types of objects, for example the file content at a certain commit. `options`
is the single value string or array of string commands you want to run.

@@ -84,0 +85,0 @@ `.listRemote([args], handlerFn)` lists remote repositories - there are so many optional arguments in the underlying

@@ -471,5 +471,10 @@ (function () {

var command = ['show'];
if (typeof args[0] === "string") {
command.push(args[0])
if (typeof options === 'string') {
command = command + ' ' + options;
this._getLog('warn',
'Git#show: supplying options as a single string is now deprecated, switch to an array of strings');
}
else if (Array.isArray(options)) {
command.push.apply(command, options);
}

@@ -476,0 +481,0 @@ return this._run(command, function(err, data) {

@@ -92,2 +92,65 @@

exports.show = {
setUp: function (done) {
sandbox.stub(console, 'warn');
Instance();
done();
},
'allows the use of an array of options': function (test) {
git.show(['--abbrev-commit', 'foo', 'bar'], function (err, result) {
test.same(0, console.warn.callCount);
test.same(
["show", "--abbrev-commit", "foo", "bar"],
theCommandRun());
test.done();
});
closeWith('commit 2d4d33a\n\
Author: Some Name <some.name@gmail.com>\n\
Date: Sun Oct 11 00:06:10 2015 +0200\n\
\
Some commit message\n\
\
diff --git a/src/file.js b/src/file.js\n\
index ab02a9b..5000197 100644\n\
--- a/src/file.js\n\
+++ b/src/file.js\n\
@@ -468,8 +468,13 @@\n\
existing unchanged content\n\
- removed content\n\
+ added content\n\
remaining content\n');
},
'allows an options string': function (test) {
git.show('--abbrev-commit', function (err, result) {
test.same(1, console.warn.callCount);
test.same(
["show", "--abbrev-commit"],
theCommandRun());
test.done();
});
closeWith('commit 2d4d33a\n\
Author: Some Name <some.name@gmail.com>\n\
Date: Sun Oct 11 00:06:10 2015 +0200\n\
\
Some commit message\n\
\
diff --git a/src/file.js b/src/file.js\n\
index ab02a9b..5000197 100644\n\
--- a/src/file.js\n\
+++ b/src/file.js\n\
@@ -468,8 +468,13 @@\n\
existing unchanged content\n\
- removed content\n\
+ added content\n\
remaining content\n');
}
};
exports.commit = {

@@ -94,0 +157,0 @@ setUp: function (done) {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc