simple-git
Advanced tools
Comparing version 1.28.1 to 1.29.0
{ | ||
"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) { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
74435
1760
188
2
11