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.5
to
1.2.6
+1
-1
package.json
{
"name": "git-branch-description",
"version": "1.2.5",
"version": "1.2.6",
"description": "manage branch description via branch-description.properties",

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

@@ -10,3 +10,4 @@ var exec = require('child_process').execSync;

var branches = exec(`git for-each-ref --format='%(refname:short)' refs/heads/`, {
cwd: parser.getRootDir()
cwd: parser.getRootDir(),
stdio: 'pipe'
}).toString();

@@ -21,3 +22,3 @@ branches = trimSingleQuote(branches);

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

@@ -55,3 +56,3 @@

try {
const diff = exec(`git fetch -q origin ${name} && git diff origin/${name} -- branch-description.properties`, {
const diff = exec(`git diff ${name} -- branch-description.properties`, {
cwd: parser.getRootDir(),

@@ -69,3 +70,3 @@ stdio: 'pipe'

try {
const diff = exec(`git diff ${name} -- branch-description.properties`, {
const diff = exec(`git diff origin/${name} -- branch-description.properties`, {
cwd: parser.getRootDir(),

@@ -81,3 +82,17 @@ stdio: 'pipe'

}
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;
}