Hacker News new | ask | show | jobs
by raverbashing 206 days ago
Funnily enough the Linux Kernel still use patches (and of course Git has helpers to create and import patches)
1 comments

Don’t they get emailed patch from git? Sorry if I’m super ignorant here, it’s interesting to me if they do!
You can use `git format-patch` to export a range of commits from your local git tree as a set of patches. You can then use `git send-email` to send that patch set out to the appropriate mailing list and maintainers (or just do it in one step, send-email accepts a similar commit range instead of patch files). It talks directly to an SMTP server you have configured in your `.gitconfig` and sends out e-mail.

Of course, `git send-email` has a plethora of options, e.g. you'd typically add a cover letter for a patch set.

Also, in the Linux kernel tree, there are some additional helper scripts that you might want to run first, like `checkpatch.pl` for some basic sanity checks and `get_maintainer.pl` that tells you the relevant maintainers for the code your patch set touches, so you can add them to `--cc`.

The patches are reviewed/discussed on the mailing list that you sent them to.

On the receiving side, as a maintainer, you'd use `git am` (apply mail) that can import the commits from a set of mbox files into your local git tree.