I'm using some private annotations in my git commit messages.
For example, when I fixed something in module MOD_A, the commit message looks like this:
FIX [MOD_A] Fixed something
As long as there's FIX in front of [MOD_A], everything works fine if I generate a patch using
git format-patch
send this patch as attachment to somewhere and then use
git am --keep-cr *.patch
in order to store this commit in another repo.
But: If I don't have FIX in front of [MOD_A] (i.e. [MOD_A] Fixed something), the start of the message is missing in the other repo after doing git am. The whole commit message is only Fixed something.
My suspicion is that it has something to do with the format of the Subject line of the E-Mail generated by git format-patch:
Subject: [PATCH 23/27] [MOD_A] Fixed something
It seems like because the [PATCH 23/27] is enclosed in squared brackets, also [MOD_A] is ignored.
Is there a way to have my [MOD_A] not ignored?
if you can live without [PATCH x/x] automatically added to subject line,
you could do git format-patch -k and then git am -k ...
i assume just pushing your patches to another repo is not an option
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With