Skip to content

Commit 45eee4f

Browse files
committed
Add patch for git-diff-apply
1 parent 5bacc2e commit 45eee4f

File tree

3 files changed

+24
-4
lines changed

3 files changed

+24
-4
lines changed

patches/git-diff-apply.patch

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
diff --git a/src/index.js b/src/index.js
2+
index 7f25f9679b0f073b8e100f5529ef6d1d5e2d484a..f85c86d6a61f96dbf8e6dde2f05d9b8ba83e6101 100644
3+
--- a/src/index.js
4+
+++ b/src/index.js
5+
@@ -142,7 +142,7 @@ module.exports = async function gitDiffApply({
6+
7+
async function createPatchFile() {
8+
let patchFile = path.join(await createTmpDir(), 'file.patch');
9+
- let ps = spawn('git', ['diff', safeStartTag, safeEndTag, '--binary'], { cwd: _tmpDir });
10+
+ let ps = spawn('git', ['diff', '--no-ext-diff', '--patience', '--binary', safeStartTag, safeEndTag], { cwd: _tmpDir });
11+
ps.stdout.pipe(fs.createWriteStream(patchFile));
12+
await ps;
13+
if (await fs.readFile(patchFile, 'utf8') !== '') {

pnpm-lock.yaml

Lines changed: 9 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pnpm-workspace.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
patchedDependencies:
2+
git-diff-apply: patches/git-diff-apply.patch

0 commit comments

Comments
 (0)