Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

git-diff-apply

Package Overview
Dependencies
Maintainers
1
Versions
132
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.5 to 0.20.6

2

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

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

@@ -141,9 +141,6 @@ 'use strict';

async function applyDiff() {
let patchFile = await createPatchFile();
if (patchFile) {
// --whitespace=fix seems to prevent any unnecessary conflicts with line endings
// https://stackoverflow.com/questions/6308625/how-to-avoid-git-apply-changing-line-endings#comment54419617_11189296
await utils.run(`git apply --whitespace=fix ${patchFile}`);
}
async function applyPatch(patchFile) {
// --whitespace=fix seems to prevent any unnecessary conflicts with line endings
// https://stackoverflow.com/questions/6308625/how-to-avoid-git-apply-changing-line-endings#comment54419617_11189296
await utils.run(`git apply --whitespace=fix ${patchFile}`);
}

@@ -189,5 +186,10 @@

let patchFile = await createPatchFile();
if (!patchFile) {
return;
}
isCodeUntracked = true;
isCodeModified = true;
await applyDiff();
await applyPatch(patchFile);

@@ -281,6 +283,2 @@ await resetIgnoredFiles();

}
if (isTempBranchCheckedOut) {
await utils.run(`git checkout ${oldBranchName}`);
}
} catch (err2) {

@@ -295,2 +293,6 @@ throw {

try {
if (isTempBranchCheckedOut) {
await utils.run(`git checkout ${oldBranchName}`);
}
if (isTempBranchCommitted && await doesBranchExist(tempBranchName)) {

@@ -297,0 +299,0 @@ await utils.run(`git branch -D ${tempBranchName}`);

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