Latest Threat Research:SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains.Details
Socket
Book a DemoInstallSign in
Socket

git-branch-description

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

git-branch-description - npm Package Compare versions

Comparing version
1.2.6
to
1.2.7
+4
-0
bin/gbrd.js

@@ -39,4 +39,8 @@ #!/usr/bin/env node

.option('-c --clean', 'hide branches without description')
.option('-f --fetch', 'fetch origin before collection branch description')
.action(function(branch, cmd) {
checkGitDir();
if (cmd.fetch) {
git.fetch();
}
let mode = cmd.all ? 'all' : cmd.remote ? 'remote' : 'local';

@@ -43,0 +47,0 @@ let clean = cmd.clean;

+1
-1
{
"name": "git-branch-description",
"version": "1.2.6",
"version": "1.2.7",
"description": "manage branch description via branch-description.properties",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -8,2 +8,8 @@ var exec = require('child_process').execSync;

exports.fetch = function() {
exec('git fetch -q -n origin', {
stdio: 'pipe'
});
}
exports.localBranches = function() {

@@ -22,3 +28,3 @@ var branches = exec(`git for-each-ref --format='%(refname:short)' refs/heads/`, {

exports.remoteBranches = function(replaceRemoteName) {
var branches = exec(`git fetch -q -n origin && git for-each-ref --format='%(refname:short)' refs/remotes/`).toString().trim();
var branches = exec(`git for-each-ref --format='%(refname:short)' refs/remotes/`).toString().trim();
branches = trimSingleQuote(branches);

@@ -80,17 +86,4 @@

}
if (!desc) {
try {
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*(.+)`));
if (matches) {
desc = matches[1].trim();
}
} catch (e) {
}
}
return desc;
}