Subject: Re: [PATCH] git gui: use apply --unidiff-zero when staging hunks without context

From: Junio C Hamano <[email-masked]>
Date: Sat, 30 Aug 2008 10:53:15 -0700

Clemens Buchacher <[email-masked]> 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.