Subject: Re: bug#11894: 24.1.50; [PATCH] diff-apply-hunk can be off by 1 line when the hunk is 0-context pure removal

From: Andreas Schwab <[email-masked]>
Date: Thu, 19 Jul 2012 10:40:57 +0200

Stefan Monnier <[email-masked]> writes:

>>> This looks like a bug in those versions of diff (not that I know
>>> a non-buggy version, tho).
>> Maybe, but that's how POSIX wants it:
>
>>     The ending line number of an empty range shall be the number of the
>>     preceding line, or 0 if the range is at the start of the file.
>
> Hmm... but the number we're talking about is the starting-line-number,
> isn't it?

There is no starting-line-number.

    Next, the range of lines in file1 shall be written in the following
    format if the range contains two or more lines:

    "*** %d,%d ****\n", <beginning line number>, <ending line number>

    and the following format otherwise:

    "*** %d ****\n", <ending line number>

Andreas.

-- 
Andreas Schwab, [email-masked]
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."