Skip to content

Broken parsing for patches with new file mode 100644 #133

@janedbal

Description

@janedbal

When a file contains new files, diff chunks contain a line with patch contents (new file mode 100644), not the actual file contents.

Example patch:

diff --git a/file1.txt b/file1.txt
new file mode 100644
--- /dev/null
+++ b/file1.txt
@@ -0,0 +1,2 @@
+Line A
+Line B
diff --git a/file2.txt b/file2.txt
new file mode 100644
--- /dev/null
+++ b/file2.txt
@@ -0,0 +1,2 @@
+Line X
+Line Y

Reproduced in #132

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions