Background: this question. git apply <patchfile> just recreates the file but without committing the history, which in this case would be desireable. Is there any switch for git-apply to do so? Or is there a way to convert the patchfile into a git-am compatible file? (Currently, git-am complains “Patch format detection failed”)
Background: this question . git apply <patchfile> just recreates the file but without committing
Share
You asked, so here it is.
I used this script, but it’s all rather fragile. Treat it an as inspiration, not as a reasonable solution.
It extracts (date / author / commit message / patch) from output of
git log -p, and then runspatch+git add+git applyfor all, in reverse order.There’s probably some way of automatically figuring out correct
patch_level, but I didn’t bother. And pass author togit applyif it’s not all you.