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 <hps%selasky.org@localhost> wrote:
Subject: Are NetBSD users interested extending options for patch?
>
> https://reviews.freebsd.org/D30160

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 <gwoods%acm.org@localhost>

Kelowna, BC     +1 250 762-7675           RoboHack <woods%robohack.ca@localhost>
Planix, Inc. <woods%planix.com@localhost>     Avoncote Farms <woods%avoncote.ca@localhost>

Attachment: pgpl4ed9jd4RL.pgp
Description: OpenPGP Digital Signature



Home | Main Index | Thread Index | Old Index