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

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

Re: patch bug (unified diffs)


From: Paul Eggert
Subject: Re: patch bug (unified diffs)
Date: Wed, 26 Jun 2002 02:06:48 -0700 (PDT)

> From: =?ISO8859-2?Q?M=E1ty=E1s_J=E1nos?= <address@hidden>
> Date: Wed, 26 Jun 2002 09:34:35 +0200 (CEST)

> > Thanks for your bug report.  That bug should be fixed in GNU diffutils
> > 2.8.1, which you can get from:
> >
> > ftp://ftp.gnu.org/gnu/diffutils/diffutils-2.8.1.tar.gz
> 
> I think the bug is in the patch utility which is in a different package.
> 
> If a create the diff with GNU diff 2.7, I can apply it with BSD patch 2.0,
> compiled from NetBSD 1.5 base.tgz sources.

Yes, that's quite possible.  However, that use of diff and patch is
not portable and reliable in practice, since it can mishandle changes
that remove or add trailing newlines to files.  That is why I don't
recommend that combination.


> We use cvs in software development and there are conflicts due this bug.
> Please create at least a workaround in the patch util.

With recent versions of GNU patch, you should be able to use "patch
-l" to work around this particular problem.  This works for me with
GNU patch 2.5.8, which you can get from
<ftp://alpha.gnu.org/gnu/patch/patch-2.5.8.tar.gz>.

However, -l may cause "patch" to misapply other patches, due to
mishandling of trailing newlines.  (A similar problem exists with BSD
patch 2.0.)  A better fix is to upgrade to a more recent version of
diffutils.



reply via email to

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