Current-Users archive

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

Re: Are NetBSD users interested extending options for patch?

At Mon, 11 Apr 2022 21:03:02 +0200, Hans Petter Selasky <> wrote:
Subject: Are NetBSD users interested extending options for patch?

As a user with some extensive background in making and using patch
files, I can't imagine that feature ever being useful; and rather
instead I would find it to be more dangerous if not just useless.

Patch already has '-p N', and in my experience that has covered most of
the cases where a similar problem actually occurs.

In all (which are very few) other cases I've found that it is trivial to
edit the patch, often in a pipeline with a simple 'sed' command (e.g. in
cases where the pathnames in the patch need a prefix applied or changed,
instead of simply stripping it with '-p').

I would expect any heuristic to automatically search and find files by
simply matching their basename to be very unreliable and to find the
wrong file just as likely -- at least in the general case.

Say for example a patch contains a lot of changes to "Makefile" files in
many different directories?  How is this hack supposed to help find the
right one (e.g. if a directory containing a "Makefile" was renamed)?

Perhaps as mentioned in a comment on that post it may be useful in some
very specific cases where files aren't likely to move around too much
and where all files are guaranteed to be uniquely named and never
renamed despite being moved about between directories.

					Greg A. Woods <>

Kelowna, BC     +1 250 762-7675           RoboHack <>
Planix, Inc. <>     Avoncote Farms <>

Attachment: pgpl4ed9jd4RL.pgp
Description: OpenPGP Digital Signature

Home | Main Index | Thread Index | Old Index