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

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

bug#64485: closed ("diff -y" broken since yesterday)


From: GNU bug Tracking System
Subject: bug#64485: closed ("diff -y" broken since yesterday)
Date: Wed, 05 Jul 2023 17:41:01 +0000

Your message dated Wed, 5 Jul 2023 10:40:26 -0700
with message-id <ad3a87e0-3d0e-d18d-4307-f3690ad1b005@cs.ucla.edu>
and subject line Re: [bug-diffutils] bug#64485: "diff -y" broken since yesterday
has caused the debbugs.gnu.org bug report #64485,
regarding "diff -y" broken since yesterday
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs@gnu.org.)


-- 
64485: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=64485
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems
--- Begin Message --- Subject: "diff -y" broken since yesterday Date: Wed, 05 Jul 2023 19:30:31 +0200
Hi Paul,

I'm trying to understand the meaning of 'in_position' and 'out_position' in
function 'print_half_line'. While doing this, I spotted a bug:

$ cat foo1.txt
a
ab
abc
$ cat foo2.txt
ab
abcd
$ src/diff -t -y foo1.txt foo2.txt
a                                                                <
ab                                                                   ab
abc                                                                |  abcd

This is obviously not how it's intended to be. The attached patch fixes it.
The cause is that in the case of a character of width 1, the assignment

  out_position = in_position;

was lost in commit 05cdf3102ef3fb261db311a3e5d090fb63dbc792 (yesterday).
With this patch, the result is again as it should be:

$ src/diff -t -y foo1.txt foo2.txt
a                                                               <
ab                                                                 ab
abc                                                             |  abcd

The patch also improves comments in this function. So that next time,
I (or anyone else) don't spent 30 minutes to understand the difference
between 'in_position' and 'out_position'.

Bruno


Attachment: 0001-diff-Fix-diff-y-output.patch
Description: Text Data


--- End Message ---
--- Begin Message --- Subject: Re: [bug-diffutils] bug#64485: "diff -y" broken since yesterday Date: Wed, 5 Jul 2023 10:40:26 -0700 User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0
Thanks, I installed that.


--- End Message ---

reply via email to

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