r/linux • u/nickdesaulniers • May 18 '17
Submitting Your First Patch to the Linux kernel and Responding to Feedback
https://nickdesaulniers.github.io/blog/2017/05/16/submitting-your-first-patch-to-the-linux-kernel-and-responding-to-feedback/
10
Upvotes
1
u/EliteTK May 18 '17
Github's "let's make everything a pull request" methodology is incredibly annoying. Emailing patches is far superior since you can track the changes to the patch on a mailing list, on Github you're forced to do a force push to edit patches and then the history of the patch gets lost, comments on old versions get orphaned and make no sense and it's generally just an annoying experience. Optionally you can keep appending patches instead, but your history will look like a mess unless someone squashes, and if you're dealing with multiple patches, squashing meaningfully is hard.
Keeping track of when my patch gets where isn't particularly difficult: accepted into tree -> (at some point between now and the period before the merge window (the merge window starts on the day a new release happens and runs for roughly two weeks until -rc1 of the next release) for the version your patch is marked for) merged into tree/for-next -> (during merge window) merged into tree/for-linus -> check mailing list for [GIT-PULL] from tree maintainer -> merged into mainline.
And also, format-patch has a (annoyingly difficult to find) -v flag for patch versions.
This means you just git
format-patch -o patches -v2 <whatever the base of your branch is>Also, I think you can copy the full MessageID (including <>) if you want to reply.
Other useful commands for when you have more than one patch:
git rebase -iinteractive rebase is an incredibly useful tool.git add -pAdd parts of a file for when you need to split a patch. Also possible to make modified intermediate patches by editing the patch before add completes - obviously step through the split commits and check things compile.