Closed stefanhaller closed 1 week ago
Coverage variation | Diff coverage |
---|---|
Report missing for b2c457366af6bfed1c52292b091b1fe1a8e52722[^1] | :white_check_mark: 100.00% |
:rocket: Don’t miss a bit, follow what’s new on Codacy.
Codacy stopped sending the deprecated coverage status on June 5th, 2024. Learn more [^1]: Codacy didn't receive coverage data for the commit, or there was an error processing the received data. Check your integration for errors and validate that your coverage setup is correct.
Several custom patch commands on parts of an added file would fail with the confusing error message "error: new file XXX depends on old contents". These were dropping the custom patch from the original commit, moving the patch to a new commit, moving it to a later commit, or moving it to the index.
We fix this by converting the patch header from an added file to a diff against an empty file. We do this not just for the purpose of applying the patch, but also for rendering it and copying it to the clip board. I'm not sure it matters much in these cases, but it does feel more correct for a filtered patch to be presented this way.
Fixes #3679.
Please check if the PR fulfills these requirements
[x] Cheatsheets are up-to-date (run
go generate ./...
)[x] Code has been formatted (see here)
[x] Tests have been added/updated (see here for the integration test guide)
[ ] Text is internationalised (see here)
[ ] Docs have been updated if necessary
[x] You've read through your own file changes for silly mistakes etc