Git-Frankenstein - Transplant Patches Between Repos

Tags:

How it started

I keep all files related to my Perl distributions in a separate git repository. The files needed to build a distribution, the author tests and some other scaffolding get copied from that repository when I start a fresh repository. I then customize the copied files. But of course, my author tests, or the Makefile.PL evolve, and most changes never propagate to old distributions.

Of course, from time to time, I copy the changed files from Dist::Template into whatever distribution I'm working on.

How it's going

git-frankenstein.pl automates this process. It transplants patches to Dist::Template onto other repos, when they fit. It basically is

for $patch in (`git log $source`) { if( `git-apply --check` ) { git-apply } }

... except that it also can list the applicable patches, before applying them:

corion#speech-recognition-vosk: git-frankenstein.pl list 626d986cdb25f2c71e7eef277c7c998f5cc87e28 update_file() handles (only) UTF-8 files 033e53e0cd9866ed281be0924bed2a265e3e5295 Remove -T from tests d5de9059421538580edbc604e64432b3211f16c7 Don't warn for every thing in our own distribution and test prerequisites 07ec7b5592e6cd96e8d5da9f4643022a52a940b1 Don't use ->import() for version checking

Also, to satisfy a real need, there also is the auto command, which automatically applies all patches that apply.

corion#speech-recognition-vosk: git-frankenstein.pl auto 626d986cdb25f2c71e7eef277c7c998f5cc87e28 update_file() handles (only) UTF-8 files 033e53e0cd9866ed281be0924bed2a265e3e5295 Remove -T from tests d5de9059421538580edbc604e64432b3211f16c7 Don't warn for every thing in our own distribution and test prerequisites 07ec7b5592e6cd96e8d5da9f4643022a52a940b1 Don't use ->import() for version checking

The code lives on Github.