[Top][All Lists]

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

Re: Questions about patch

From: Gary Setter
Subject: Re: Questions about patch
Date: Mon, 18 Apr 2005 13:13:27 -0500


I'm testing my changes to patch. There is some code that I don't
know how to exercise. It is in the pch.c module function
intuit_diff_type. It seem to be trying to handle heading that
diff generates. I'm particularly interested in the Prereq header.
I don't see anything in the help for diff that would generate
this type of thing. I downloaded diffutils-2.8.1 and searched for
the keywords Index: and Prereq: found nothing. If you or someone
on the mailing list know how this type of header is generated, I
will test this feature.

The relevant lines from intuit_diff_type follow.

 if (!stars_last_line && strnEQ(s, "*** ", 4))
     name[OLD] = fetchname (s+4, strippath, &p_timestamp[OLD]);
 else if (strnEQ(s, "+++ ", 4))
     /* Swap with NEW below.  */
     name[OLD] = fetchname (s+4, strippath, &p_timestamp[OLD]);
 else if (strnEQ(s, "Index:", 6))
     name[INDEX] = fetchname (s+6, strippath, (time_t *) 0);
 else if (strnEQ(s, "Prereq:", 7)) {

reply via email to

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