From: Junio C Hamano Date: Sat, 30 Aug 2008 17:53:15 GMT Subject: Re: [PATCH] git gui: use apply --unidiff-zero when staging hunks without context Message-ID: <7vhc92ie44.fsf@gitster.siamese.dyndns.org> In-Reply-To: <20080830165600.GB25370@localhost> Clemens Buchacher 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.