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.1
to
1.2.5
+9
-2
bin/gbrd.js

@@ -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",

@@ -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) {