GNU bug report logs -
#23644
bug with context greater than 0
Previous Next
To reply to this bug, email your comments to 23644 AT debbugs.gnu.org.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-diffutils <at> gnu.org
:
bug#23644
; Package
diffutils
.
(Sun, 29 May 2016 05:48:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Claude <lamy.claude <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-diffutils <at> gnu.org
.
(Sun, 29 May 2016 05:48:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hi
I think I have found a bug with diff when context is greater then zero.
I have included the two files and the diff file produced.
This diff file has been generated with version 2.7 running on Windows 7.
The same behavior have been noticed with version 3.3 running on linux.
My command was diff -C 2 original.txt modified.txt
Now looking on the produced diff file, I had two additions. At the
beggining and at the end of my modified file.
*** Original.txt Sat May 28 09:07:08 2016
--- Modified.txt Sat May 28 09:07:18 2016
***************
*** 1,2 ****
--- 1,8 ----
+ This is an important
+ notice! It should
+ therefore be located at
+ the beginning of this
+ document!
+
This part of the
document has stayed the
***************
*** 6,20 ****
change. Otherwise, that
would not be helping to
! compress the size of the
! changes.
!
! This paragraph contains
! text that is outdated.
! It will be deleted in the
! near future.
allo
It is important to spell
! check this dokument. On
the other hand, a
misspelled word isn't
--- 12,20 ----
change. Otherwise, that
would not be helping to
! compress anything.
allo
It is important to spell
! check this document. On
the other hand, a
misspelled word isn't
***************
*** 24,25 ****
--- 24,29 ----
be changed. Things can
be added after it.
+
+ This paragraph contains
+ important new additions
+ to this document.
Notice that on the original file diff specifies that it will list
context lines content 1,2 for the
beginning and 24,25 for the end, but the lines are not displayed in the
diff block description.
The two context lines appear for the modified files for the same
differences though.
Also, the two context lines are displayed, at top, and at bottom when
differences occure in the middle of the file.
I have no corrections for this bug. I haven't looked at the code.
Thanks
[Original.txt (text/plain, attachment)]
[differences-context-2.txt (text/plain, attachment)]
[Modified.txt (text/plain, attachment)]
Information forwarded
to
bug-diffutils <at> gnu.org
:
bug#23644
; Package
diffutils
.
(Sun, 29 May 2016 06:48:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 23644 <at> debbugs.gnu.org (full text, mbox):
Claude wrote:
> Notice that on the original file diff specifies that it will list context lines
> content 1,2 for the
> beginning and 24,25 for the end, but the lines are not displayed in the diff
> block description.
Yes they are; they are common context, e.g., lines 24-25 of the first file are
the same as lines 24-25 of the second file, so they are displayed once with
leading ' '.
> The two context lines appear for the modified files for the same differences
> though.
> Also, the two context lines are displayed, at top, and at bottom when
> differences occure in the middle of the file.
Sorry, I don't see the bugs here; the output looks OK to me.
Information forwarded
to
bug-diffutils <at> gnu.org
:
bug#23644
; Package
diffutils
.
(Sun, 29 May 2016 19:51:01 GMT)
Full text and
rfc822 format available.
Message #11 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On Sat, 28 May 2016 23:46:53 -0700, Paul Eggert wrote:
> Claude wrote:
>> Notice that on the original file diff specifies that it will list context lines
>> content 1,2 for the
>> beginning and 24,25 for the end, but the lines are not displayed in the diff
>> block description.
>
> Yes they are; they are common context, e.g., lines 24-25 of the first
> file are the same as lines 24-25 of the second file, so they are
> displayed once with leading ' '.
>
>> The two context lines appear for the modified files for the same differences
>> though.
>> Also, the two context lines are displayed, at top, and at bottom when
>> differences occure in the middle of the file.
>
> Sorry, I don't see the bugs here; the output looks OK to me.
Same for me.
Third chunk beginning line 24 in both files
at first seemed odd to me,
but there are as many less lines in chunk 2
than there are more lines in chunk 1.
So everything is fine.
--
Eric Deplagne
[signature.asc (application/pgp-signature, inline)]
Information forwarded
to
bug-diffutils <at> gnu.org
:
bug#23644
; Package
diffutils
.
(Tue, 31 May 2016 14:55:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 23644 <at> debbugs.gnu.org (full text, mbox):
tags 23644 notabug
close 23644
thanks
On Sat, May 28, 2016 at 11:46 PM, Paul Eggert <eggert <at> cs.ucla.edu> wrote:
> Claude wrote:
>>
>> Notice that on the original file diff specifies that it will list context
>> lines
>> content 1,2 for the
>> beginning and 24,25 for the end, but the lines are not displayed in the
>> diff
>> block description.
>
>
> Yes they are; they are common context, e.g., lines 24-25 of the first file
> are the same as lines 24-25 of the second file, so they are displayed once
> with leading ' '.
>
>> The two context lines appear for the modified files for the same
>> differences
>> though.
>> Also, the two context lines are displayed, at top, and at bottom when
>> differences occure in the middle of the file.
>
> Sorry, I don't see the bugs here; the output looks OK to me.
Same here, so I'm marking this auto-created 'issue' as a non-bug and closing it.
This bug report was last modified 9 years and 19 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.