Page MenuHomePhabricator

certain Differential revisions create unpatchable raw diffs in git
Closed, DuplicatePublic

Description

Here's an example raw diff generated by Phabricator:

diff --git a/build-steps/generic-build b/build-steps/generic-build
old mode 100755
new mode 120000
--- /dev/null
+++ b/build-steps/generic-build
@@ -0,0 +1 @@
+generic-build.py
\ No newline at end of file
diff --git a/build-steps/generic-build b/build-steps/generic-build.bak
copy from build-steps/generic-build
copy to build-steps/generic-build.bak
diff --git a/build-steps/generic-build.py b/build-steps/generic-build.py
new file mode 100644

Applying it with git apply D0000.diff I get error: dev/null: No such file or directory.

In the diff, I am moving a file, and replacing it's original filename with a symlink to another newly created file.