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.30.0 to 1.31.0

src/BranchSummary.js

2

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

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

@@ -42,2 +42,4 @@ # Simple Git

`.branch(handlerFn)` list all branches
`.tags(handlerFn)` list all tags

@@ -65,2 +67,5 @@

`.branch([handlerFn])` gets a list of all branches, calls `handlerFn` with two arguments, an error object
and [BranchSummary](blob/master/src/BranchSummary.js) instance.
`.commit(message, handlerFn)` commits changes in the current working directory with the supplied message where the

@@ -67,0 +72,0 @@ message can be either a single string or array of strings to be passed as separate arguments (the `git` command line

@@ -347,2 +347,13 @@ (function () {

/**
* List all branches
*
*@param {Function} [then]
*/
Git.prototype.branch = function (then) {
return this._run(['branch', '-a', '-v'], function (err, data) {
then && then(err, !err && require('./BranchSummary').parse(data));
});
};
/**

@@ -349,0 +360,0 @@ * Add config to local git instance

@@ -98,3 +98,28 @@

exports.branch = {
setUp: function (done) {
Instance();
done();
},
'gets branch data': function (test) {
git.branch(function (err, branchSummary) {
test.equals(null, err, 'not an error');
test.equals('drschwabe-add-branches', branchSummary.current);
test.same(['cflynn07-add-git-ignore', 'drschwabe-add-branches', 'master'], branchSummary.all);
test.same('Release 1.30.0', branchSummary.branches.master.label);
test.same('cb4be06', branchSummary.branches.master.commit);
test.done();
});
closeWith('\
cflynn07-add-git-ignore a0b67a3 Add support for filenames containing spaces\n\
* drschwabe-add-branches 063069b Merge branch \'add-branches\' of https://github.com/drschwabe/git-js into drschwabe-add-branches\n\
master cb4be06 Release 1.30.0\n\
');
}
};
exports.commit = {

@@ -101,0 +126,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