Strange format for patch with the new file

Hello there,

 

I can't understand the format you use to save patch file in PhpStorm. The main problem is that your patches are visually similar to the patches produced by git itself (we use it in our company) but they differ in case of new file creation. If I create a new file and generate a patch from PhpStorm I will have something like this:

 

Index: 1.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- 1.php (date 1530118192000)
+++ 1.php (date 1530118192000)
@@ -0,0 +1,3 @@
+<?php
+
+// something meaningful
\ No newline at end of file

 

And here is a Git patch for the same file:

diff --git a/1.php b/1.php
new file mode 100644
index 000000000000..e379a278c450
--- /dev/null
+++ b/1.php
@@ -0,0 +1,3 @@
+<?php
+
+// something meaningful
\ No newline at end of file

 

 

To understand why do I need this: we have an internal system which makes git-apply for files that you send and I can't see how can we apply this kind of patches.

 

The main problem, for now, is that I can't find out how can we determine that this file is new having the header "--- 1.php".

 

Thanks!

0

Hi there,

I guess https://youtrack.jetbrains.com/issue/IDEA-92793 and related tickets...

No better ideas from me (as I'm not making any patch/diff files myself)

0

请先登录再写评论。