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

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

Possible bug in diff?


From: B Traver
Subject: Possible bug in diff?
Date: Sat, 23 Oct 2004 01:45:48 -0400

I'm running the Windows version of DiffUtils, and I don't really know if
this is a bug or not.  It looks like one, but that's an inference from
what I've observed from the general make-up of the diff file.

Here's the command I entered:

diff -c a.xml b.xml > cab.patch

In the resulting file diff, the section I'm concerned about is this:

       <ItemIndex>-2147483648</ItemIndex>
  --- 541,546 ----
  ****************** 315,329 ****
      <IsInterface>0</IsInterface>

What I don't understand in particular is this:

  --- 541,546 ----
  ***************

Shouldn't lines 541 through 546 appear between the "--- 541,546 ---" and
the row of asterisks?

The otherwise consistent pattern of the diff file is that after a pair
of numbers you're given the lines for the range specified (for file a or
file b, according to whether they're preceded by "***" or "---").

I'm not a professional programmer.  I do some programming for enjoyment
as a hobby, and I set myself the task (it's a long story) of proving
that I could write a patch program in REALbasic that could handle
standard, unified, and context diff files.

My program can now handle standard and unified diff files, and my
routine to patch context files works perfectly _except_ that it doesn't
know how to handle this situation:

--- 541,546 ----
***************

I'm hoping that it's a bug in the output of the DiffUtils diff program,
because that would mean my program is all right, but I wrote my program
entirely on the basis of making inferences on what I observed of the
structure of the diff files.

If it does turn out to be a bug, it is reproducible, and I can supply
the original files from which the diff file was produced.

Barry Traver
btraver at traver dot org

P.S.  I'm not on the list serve, so I'd greatly appreciate it if replies
(or copies thereof) could be sent to me via email.  Thanks!





reply via email to

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