On 9/1/06, Ted Unangst <[EMAIL PROTECTED]> wrote:
On 9/1/06, viq <[EMAIL PROTECTED]> wrote:
> On 9/1/06, Ted Unangst <[EMAIL PROTECTED]> wrote:
> > On 8/31/06, viq <[EMAIL PROTECTED]> wrote:
> > > On 8/31/06, Otto Moerbeek <[EMAIL PROTECTED]> wrote:
> > > > Now I don't know if GNU patch has a more smart heuristic for this
> > > > case, but it could very well be just good luck GNU patch is appplying
> > > > the hunk at a better place, in this particluar case.
> > >
> > > Yes, GNU patch doesn't seem to have problems with this, while
> > > OpenBSD's does. So, a bug or a feature? Fix patch or fix patches? ;)
> >
> > so what happens when the last line that was added prior to the diff is
> > # EOF
> > ?  where does gnu diff put the eof marker?
> >
>
> I'm not sure what you're asking here... If you mean where does the
> resulting file end, then GNU as last line has:
> $(LN_S) $(silc_top_srcdir)/lib/.libs/libsilcclient.a .libs/silcclient.a

i meant if "# EOF" was literally the last line.  as in somebody added
it.  based on your description, it seems gnu patch would leave that
line in the middle of the file.  i'm referring to otto's "good luck"
comment.

When I add text "# EOF" (or without space) as the last line of the
file to be patched (either adding new line or not), the only thing
that changes is that now the (broken) patched file's last line says
that instead of being an empty line. That's for OpenBSD's patch, and
after doing that I finally understood what you meant ;)

With GNU patch, if I add that text in the last line I have to patch
with -F3, if I add a new line with that text, then the default (-F2)
works. But produces broken patched file with that text at the end of
it just as above.

--
viq

Reply via email to