Socket
Socket
Sign inDemoInstall

git-diff-apply

Package Overview
Dependencies
Maintainers
1
Versions
131
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

git-diff-apply - npm Package Compare versions

Comparing version 0.20.3 to 0.20.4

src/does-branch-exist.js

2

package.json
{
"name": "git-diff-apply",
"version": "0.20.3",
"version": "0.20.4",
"description": "Use an unrelated remote repository to apply a git diff",

@@ -5,0 +5,0 @@ "main": "src",

'use strict';
const run = require('./run');
const utils = require('./utils');

@@ -11,3 +12,3 @@ module.exports = async function commit(options) {

// or the second commit has no changes
await run('git commit --allow-empty -m "message" --no-verify', options);
await utils.run('git commit --allow-empty -m "message" --no-verify', options);
};

@@ -23,2 +23,3 @@ 'use strict';

const mergeDir = require('./merge-dir');
const doesBranchExist = require('./does-branch-exist');

@@ -179,5 +180,5 @@ const { isGitClean } = gitStatus;

isTempBranchCommitted = true;
await commit();
isCodeUntracked = false;
isTempBranchCommitted = true;

@@ -289,3 +290,3 @@ isCodeUntracked = true;

try {
if (isTempBranchCommitted) {
if (isTempBranchCommitted && await doesBranchExist(tempBranchName)) {
await utils.run(`git branch -D ${tempBranchName}`);

@@ -292,0 +293,0 @@ }

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