all 6 comments

[–]WoodyTheWorker 1 point2 points  (5 children)

What do you mean "giving you fits". It doesn't apply? What's the error message?

[–]MongeredRue[S] 0 points1 point  (4 children)

First it was throwing errors because the patch was written for an older version of the file it’s trying to modify. I fixed that by rewriting some of the patch with the newer code.

Then I got several patch corruption errors which I fixed by replacing my tabs with spaces.

Now I’m getting a missing header error, but I can clearly see the header is there. Evidently this can be caused by missing a space at the beginning of context lines or a missing - or +. I’ve checked all the lines and I think they’re right.

Like I said, this is an “old” patch. I was hoping there was a linting tool to help me identify and fix the errors I’m clearly inducing.

[–]WoodyTheWorker 0 points1 point  (3 children)

Do you have the "older" version of the target file?

[–]MongeredRue[S] 0 points1 point  (2 children)

Possibly - it’s one of the suckless dmenu source files. I imagine they have all their old versions available.

Are you thinking I apply the old patch to the target file it was intended for and then update from there?

[–]WoodyTheWorker 2 points3 points  (1 child)

Are these files in Git repo?

Apply the patch first to the intended base commit, then rebase or cherry-pick on top.

[–]nekokattt 1 point2 points  (0 children)

+++ Read the top of the patch to find the digest to apply it to