NACK! --unidiff-zero eats your data.
1. Prepare a modification that adds 2 lines that are *not* adjacent, like this:
@@ -6,6 +6,8 @@ git-checkout [options] [<branch>] [<paths>...]
--
b= create a new branch started at <branch>
+first
l create the new branch's reflog
track arrange that the new branch tracks the remote branch
+after track
f proceed even if the index or working tree is not HEAD
m merge local modifications into the new branch
2. Reduce context to zero.
3. Stage *second* hunk.
Result: It is staged at the wrong place:
@@ -9,4 +9,5 @@ l create the new branch's reflog
track arrange that the new branch tracks the remote branch
f proceed even if the index or working tree is not HEAD
+after track
m merge local modifications into the new branch
q,quiet be quiet
Reason: --unidiff-zero can only look at the line numbers. And those are
wrong because it doesn't account for the shift in line numbers caused by the
first hunk.
-- Hannes