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

Previous Next

Package: emacs;

Reported by: Dmitry Gutov <dgutov <at> yandex.ru>

Date: Tue, 10 Jul 2012 01:53:01 UTC

Severity: normal

Tags: patch, wontfix

Found in version 24.1.50

Done: Chong Yidong <cyd <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #20 received at 11894 <at> debbugs.gnu.org (full text, mbox):

From: Andreas Schwab <schwab <at> linux-m68k.org>
To: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
Cc: 11894 <at> debbugs.gnu.org, Dmitry Gutov <dgutov <at> yandex.ru>
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
Date: Thu, 19 Jul 2012 10:40:57 +0200
Stefan Monnier <monnier <at> 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 <at> linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."




This bug report was last modified 12 years and 234 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.