bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#11894: 24.1.50; [PATCH] diff-apply-hunk can be off by 1 line when th


From: Andreas Schwab
Subject: bug#11894: 24.1.50; [PATCH] diff-apply-hunk can be off by 1 line when the hunk is 0-context pure removal
Date: Thu, 19 Jul 2012 10:40:57 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1 (gnu/linux)

Stefan Monnier <monnier@IRO.UMontreal.CA> 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, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."





reply via email to

[Prev in Thread] Current Thread [Next in Thread]