Clemens Buchacher <drizzd@xxxxxx> writes: > echo a > victim > git add victim > echo b >> victim > git diff -U0 | git apply --cached --unidiff-zero > git diff I think "diff -U0" there would say "@@ -1,0 +2 @@", iow "add this one line after the first line", and "apply" has an off-by-one in this case. -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html