Re: [PATCH] git gui: use apply --unidiff-zero when staging hunks without context
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Aug 30, 2008, 17:53 UTC
- Message-ID
- <7vhc92ie44.fsf@gitster.siamese.dyndns.org>
- In-Reply-To
- <20080830165600.GB25370@localhost>
Clemens Buchacher <drizzd@aon.at> writes:
Show 5 quoted lines
> 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.