On Fri, Dec 15, 2023 at 06:33:00PM +0000, Pádraig Brady wrote:
Advantages of leaving as is:
We get consistency of "noclobber" behavior across systems / shells.

You don't, unless you ignore the coreutils/linux installed base entirely. Essentially the current situation is that -n shouldn't be used if you expect a certain behavior for this case and you are writing a script for linux systems. Maybe in 10 years you'll be able to assume the new behavior. Better to just tell people to not use it at all, and leave the historic behavior alone until everyone has stopped using -n entirely.

There is no potential for data loss etc.

There may not be, strictly speaking, if you look only at cp without context, but we have absolutely no idea what the impact is on the unknown number of existing scripts that depend on the historic behavior. This is causing breakages in practice.

so it just comes
down to how disruptive it is, or how often -n was used
with the "skip behavior" assumption.

IMO, it should come down to trying to avoid breaking changes in core system utilities. There's no compelling reason to force this change, so why break anything that depended on the historic behavior--especially without any notice or transition period--regardless of arguments over whether the historic behavior was right?

We've not had much push back as of yet,
and my current thinking is it's not that disruptive a change.

I suspect that's because it has not yet been widely deployed, which makes now the time to fix it.

Michael Stone



Reply via email to