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.28.1 to 1.29.0

2

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

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

@@ -26,4 +26,6 @@ # Simple Git

`init(bare, handlerFn)` initialize a repository, optional `bare` parameter makes intialized repository bare.
`.addConfig(key, value[, handlerFn])` add a local configuration property
`.init(bare, handlerFn)` initialize a repository, optional `bare` parameter makes intialized repository bare.
`.clone(repoPath, localPath, handlerFn)` clone a remote repo at `repoPath` to a local directory at `localPath`

@@ -30,0 +32,0 @@

@@ -343,2 +343,15 @@ (function () {

/**
* Add config to local git instance
*
* @param {string} key configuration key (e.g user.name)
* @param {string} value for the given key (e.g your name)
* @param {Function} [then]
*/
Git.prototype.addConfig = function (key, value, then) {
return this._run(['config', '--local', key, value], function (err, data) {
then && then(err, !err && data);
});
};
/**
* Add a submodule

@@ -345,0 +358,0 @@ *

@@ -487,2 +487,21 @@

exports.config = {
setUp: function (done) {
Instance();
done();
},
'add': function (test) {
git.addConfig('user.name', 'test', function (err, result) {
test.equals(null, err, 'not an error');
test.same(
['config', '--local', 'user.name', 'test'],
theCommandRun());
test.done();
});
closeWith('');
}
};
exports.reset = {

@@ -489,0 +508,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