git-branch-description
Advanced tools
+9
-2
@@ -23,8 +23,10 @@ #!/usr/bin/env node | ||
| function checkGitDir() { | ||
| check.invariantGitDir(check.isGitDir()); | ||
| } | ||
| check.invariantGitDir(check.isGitDir()); | ||
| program.command('init') | ||
| .description('initialize a git repository with a branch-description.properties') | ||
| .action(function(cmd) { | ||
| checkGitDir(); | ||
| init(); | ||
@@ -39,2 +41,3 @@ }); | ||
| .action(function(branch, cmd) { | ||
| checkGitDir(); | ||
| let mode = cmd.all ? 'all' : cmd.remote ? 'remote' : 'local'; | ||
@@ -48,2 +51,3 @@ let clean = cmd.clean; | ||
| .action(function() { | ||
| checkGitDir(); | ||
| prune(); | ||
@@ -55,2 +59,3 @@ }); | ||
| .action(function() { | ||
| checkGitDir(); | ||
| conflict(); | ||
@@ -62,2 +67,3 @@ }); | ||
| .action(function() { | ||
| checkGitDir(); | ||
| var currentBranch = exec('git rev-parse --abbrev-ref HEAD').toString().trim(); | ||
@@ -95,2 +101,3 @@ var branches = git.localBranches(); | ||
| .action(function(regex) { | ||
| checkGitDir(); | ||
| find(regex); | ||
@@ -97,0 +104,0 @@ }); |
+1
-1
| { | ||
| "name": "git-branch-description", | ||
| "version": "1.2.1", | ||
| "version": "1.2.5", | ||
| "description": "manage branch description via branch-description.properties", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
+10
-3
@@ -46,3 +46,4 @@ var exec = require('child_process').execSync; | ||
| desc = exec(`git config branch.${name}.description`, { | ||
| cwd: parser.getRootDir() | ||
| cwd: parser.getRootDir(), | ||
| stdio: 'pipe' | ||
| }).toString().trim(); | ||
@@ -53,3 +54,6 @@ } catch (e) { | ||
| try { | ||
| const diff = exec(`git fetch --all && git diff origin/${name} branch-description.properties`).toString(); | ||
| const diff = exec(`git fetch -q origin ${name} && git diff origin/${name} -- branch-description.properties`, { | ||
| cwd: parser.getRootDir(), | ||
| stdio: 'pipe' | ||
| }).toString(); | ||
| const matches = diff.match(new RegExp(`-${name}\\s*=\\s*(.+)`)); | ||
@@ -64,3 +68,6 @@ if (matches) { | ||
| try { | ||
| const diff = exec(`git fetch --all && git diff ${name} branch-description.properties`).toString(); | ||
| const diff = exec(`git diff ${name} -- branch-description.properties`, { | ||
| cwd: parser.getRootDir(), | ||
| stdio: 'pipe' | ||
| }).toString(); | ||
| const matches = diff.match(new RegExp(`-${name}\\s*=\\s*(.+)`)); | ||
@@ -67,0 +74,0 @@ if (matches) { |
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
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
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
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
13546
2.82%342
4.59%