favorite text
editor and make sure everything looks alright; however, it's not recommended to
make code fixups via the patch file. It's a better idea to make the change the
normal way using `git rebase -i` or by adding a new commit than by modifying a
patch.
NOTE: Optionally, you can also use the `--rfc` flag to prefix your patch subject
with ``[RFC PATCH]'' instead of ``[PATCH]''. RFC stands for ``request for
comments'' and indicates that while your code isn't quite ready for submission,
you'd like to begin the code review process. This can also be used when your
patch is a proposal, but you aren't sure whether the community wants to solve
the problem with that approach or not - to conduct a sort of design review. You
may also see on the list patches marked ``WIP'' - this means they are incomplete
but want reviewers to look at what they have so far. You can add this flag with
`--subject-prefix=WIP`.
Check and make sure that your patches and cover letter template exist in the
directory you specified - you're nearly ready to send out your review!
[[preparing-cover-letter]]
=== Preparing Email
Since you invoked `format-patch` with `--cover-letter`, you've already got a
cover letter template ready. Open it up in your favorite editor.
You should see a number of headers present already. Check that your `From:`
header is correct. Then modify your `Subject:` (see <<cover-letter,above>> for
how to choose good title for your patch series):
----
Subject: [PATCH 0/7] Add the 'psuh' command
----
Make sure you retain the ``[PATCH 0/X]'' part; that's what indicates to the Git
community that this email is the beginning of a patch series, and many
reviewers filter their email for this type of flag.
You'll need to add some extra parameters when you invoke `git send-email` to add
the cover letter.
Next you'll have to fill out the body of your cover letter. Again, see
<<cover-letter,above>> for what content to include.
The template created by `git format-patch --cover-letter` includes a diffstat.
This gives reviewers a summary of what they're in for when reviewing your topic.
The one generated for `psuh` from the sample implementation looks like this:
----
Documentation/git-psuh.adoc | 40 +++++++++++++++++++++
Makefile | 1 +
builtin.h | 1 +
builtin/psuh.c | 73 ++++++++++++++++++++++++++++++++++++++
git.c | 1 +
t/t9999-psuh-tutorial.sh | 12 +++++++
6 files changed, 128 insertions(+)
create mode 100644 Documentation/git-psuh.adoc
create mode 100644 builtin/psuh.c
create mode 100755 t/t9999-psuh-tutorial.sh
----
Finally, the letter will include the version of Git used to generate the
patches. You can leave that string alone.
[[sending-git-send-email]]
=== Sending Email
At this point you should have a directory `psuh/` which is filled with your
patches and a cover letter. Time to mail it out! You can send it like this:
----
$ git send-email --to=target@example.com psuh/*.patch
----
NOTE: Check `git help send-email` for some other options which you may find
valuable, such as changing the Reply-to address or adding more CC and BCC lines.
:contrib-scripts: footnoteref:[contrib-scripts,Scripts under `contrib/` are +
not part of the core `git` binary and must be called directly. Clone the Git +
codebase and run `perl contrib/contacts/git-contacts`.]
NOTE: If you're not sure whom to CC, running `contrib/contacts/git-contacts` can
list potential reviewers. In addition, you can do `git send-email
--cc-cmd='perl contrib/contacts/git-contacts' feature/*.patch`{contrib-scripts} to
automatically pass this list of emails to `send-email`.
NOTE: When you are sending a real patch, it will go to git@vger.kernel.org - but
please don't send your patchset from the tutorial to the real mailing list! For
now, you can send it to yourself, to make sure you understand how it will look.
After you run the command above, you will be presented with an interactive
prompt for