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

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

Re: Change "patch" to output unified-diff rejects


From: Paul Eggert
Subject: Re: Change "patch" to output unified-diff rejects
Date: 29 Jan 2004 16:38:58 -0800
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3

Wayne Davison <address@hidden> writes:

> I'd like to see the patch program output its reject files in unified
> diff format rather than using context diff format.

Thanks for the patch.  POSIX requires that the output be in context
diff format.  However, the POSIX requirement does not apply if the
input is in unified format, so it'd be OK to for 'patch' to output
.rej as unified format if the input patch was unified.

> The only thing I'm not sure of is the lines that might have a '\n'
> pch_end character -- the new code discards these lines (like the
> apply_hunk() routine does) instead of outputting them.

I think this occurs only if the input hunk is malformed and contains
empty lines where it should contain the remaining part of the hunk.
In this case perhaps the best thing to do is to output the malformed
hunk as-is (as much as possible), much as the previous abort_hunk()
did.  Even though apply_hunk has to discard these lines, they may be
useful to the human reading the aborted patch.

Can you please modify your patch with the above suggestions in mind?
If you don't have time, that's OK, as I'll take a look at it
eventually; but perhaps this stuff is all clear in your head now so
it'd be faster for you to do it.  Thanks.




reply via email to

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