Skip to content

Can't apply patch that removes the last empy line of a file #62

@luisdavim

Description

@luisdavim

I generated some diff files using https://pkg.go.dev/github.com/rogpeppe/go-internal/diff and then tried to apply them with this library and got unexpected EOF.

This is the diff in question:

diff values.yaml values.yaml
--- values.yaml
+++ values.yaml
@@ -42,8 +42,8 @@
     # cpu: 1000m
     # memory: 1Gi
     requests:
-      cpu: 100m
-      memory: 64Mi
+      cpu: 150m
+      memory: 120Mi
   priorityClassName: ""
   annotations:
     prometheus.io/port: "8080"
@@ -233,7 +233,6 @@
       #    hosts:
       #      - flux-webhook.example.com

-
   nodeSelector: {}
   affinity: {}
   tolerations: []
@@ -328,4 +327,3 @@

 distro:
   openshift: false
-

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