@@ -1029,22 +1029,42 @@ kidding - be patient!)
1029
1029
[[v2-git-send-email]]
1030
1030
=== Sending v2
1031
1031
1032
- Skip ahead to <<reviewing,Responding to Reviews>> for information on how to
1033
- handle comments from reviewers. Continue this section when your topic branch is
1034
- shaped the way you want it to look for your patchset v2.
1032
+ This section will focus on how to send a v2 of your patchset. To learn what
1033
+ should go into v2, skip ahead to <<reviewing,Responding to Reviews>> for
1034
+ information on how to handle comments from reviewers.
1035
+
1036
+ We'll reuse our `psuh` topic branch for v2. Before we make any changes, we'll
1037
+ mark the tip of our v1 branch for easy reference:
1035
1038
1036
- When you're ready with the next iteration of your patch, the process is fairly
1037
- similar.
1039
+ ----
1040
+ $ git checkout psuh
1041
+ $ git branch psuh-v1
1042
+ ----
1038
1043
1039
- First, generate your v2 patches again:
1044
+ Refine your patch series by using `git rebase -i` to adjust commits based upon
1045
+ reviewer comments. Once the patch series is ready for submission, generate your
1046
+ patches again, but with some new flags:
1040
1047
1041
1048
----
1042
- $ git format-patch -v2 --cover-letter -o psuh/ master..psuh
1049
+ $ git format-patch -v2 --cover-letter -o psuh/ --range-diff master..psuh-v1 master..
1043
1050
----
1044
1051
1045
- This will add your v2 patches, all named like `v2-000n-my-commit-subject.patch`,
1046
- to the `psuh/` directory. You may notice that they are sitting alongside the v1
1047
- patches; that's fine, but be careful when you are ready to send them.
1052
+ The `--range-diff master..psuh-v1` parameter tells `format-patch` to include a
1053
+ range-diff between `psuh-v1` and `psuh` in the cover letter (see
1054
+ linkgit:git-range-diff[1]). This helps tell reviewers about the differences
1055
+ between your v1 and v2 patches.
1056
+
1057
+ The `-v2` parameter tells `format-patch` to output your patches
1058
+ as version "2". For instance, you may notice that your v2 patches are
1059
+ all named like `v2-000n-my-commit-subject.patch`. `-v2` will also format
1060
+ your patches by prefixing them with "[PATCH v2]" instead of "[PATCH]",
1061
+ and your range-diff will be prefaced with "Range-diff against v1".
1062
+
1063
+ Afer you run this command, `format-patch` will output the patches to the `psuh/`
1064
+ directory, alongside the v1 patches. Using a single directory makes it easy to
1065
+ refer to the old v1 patches while proofreading the v2 patches, but you will need
1066
+ to be careful to send out only the v2 patches. We will use a pattern like
1067
+ "psuh/v2-*.patch" (not "psuh/*.patch", which would match v1 and v2 patches).
1048
1068
1049
1069
Edit your cover letter again. Now is a good time to mention what's different
1050
1070
between your last version and now, if it's something significant. You do not
@@ -1082,7 +1102,7 @@ to the command:
1082
1102
----
1083
1103
$ git send-email
[email protected]
1084
1104
--in-reply-to="<
[email protected] >"
1085
- psuh/v2*
1105
+ psuh/v2-*.patch
1086
1106
----
1087
1107
1088
1108
[[single-patch]]
0 commit comments