bug#68504: [PATCH] Add copy-on-write support to scm_copy_file.

Tomas Volf <[email protected]>
Newsgroups gmane.lisp.guile.bugs
Message-ID <ZbFi17RoTqMph9a7@ws>
On 2024-01-24 11:26:56 +0100, Ludovic Courtès wrote:
>
> The patch looks great (and very useful) to me, modulo one issue:
>
> > -SCM_API SCM scm_copy_file (SCM oldfile, SCM newfile);
> > +SCM_API SCM scm_copy_file (SCM oldfile, SCM newfile, SCM rest);
>
> Since this is a public interface, we cannot change this function’s
> signature during the 3.0 stable series.
>
> Thus, I would suggest keeping the public ‘scm_copy_file’ unchanged and
> internally having a three-argument variant.  The Scheme-level
> ‘copy-file’ would map to that three-argument variant.  (See how
> ‘scm_pipe’ and ‘scm accept’ as examples.)

That is a very good point, which I did not realize at all.  Thanks to the
examples you provided, it was not that hard to do (well, assuming I did it
right).

> Could you send an updated patch?

Done.  However now that I read it after myself, I overlooked this occurrence of
scm_copy_file in the commit message:

    This commit adds support for this feature into our
    copy-file (scm_copy_file) procedure.  Same as `cp', it defaults to

So I just sent v3 right after v2, sorry for the noise, should have been more
careful.

>
> BTW, copyright assignment to the FSF is now optional but encouraged.
> Please see
> <https://lists.gnu.org/archive/html/guile-devel/2022-10/msg00008.html>.

Since it is optional, I will currently opt into not doing the assignment, I do
not like the concept that much.  I will try to find time to actually form an
opinion based on facts.

Have a nice day,
Tomas

--
There are only two hard things in Computer Science:
cache invalidation, naming things and off-by-one errors.
signature.asc (application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEt4NJs4wUfTYpiGikL7/ufbZ/wakFAmWxYtcACgkQL7/ufbZ/
walVqxAAi5THU9sSyNMZOZigU3Wb4PVZWPkRE2FjPG1AiXbwpJlaki6A7yRvXYT7
N62ChPRI0CHf1NPBAnuKLd9w4/0rpARWTKBloVD4WklM39hQKaQLqOVtZoLKud4R
huf9L6rZQ20oH071UwnP2el23v/tMSWNowcnlsydamVy4/d6TAsG8wqQkp6bG1wm
51v1N+KTzp+W1Gvro/LE5kd4f4gq8D+CpecKKs+XFKEeOh2IkwRhrRxuKVoSJyl4
1g1rOFOZocx8Z96Mywt/Gmz09qlpxqORfG8cGvPlhkMDtMrOv3cF4AhLb6ndDHg7
i6Qk0Qg21e5vN2ADQpWnW/61VT98KemRhqRoftezkOeGNHyJz1Cso7gNXN9OWJeu
nE0NxJ/QDcYsNohL1Wh7h7+MVNmviUXqnkNsIqzWximo08LXcQ4/wQOKBCX1rYkA
Nlxjcqe42VNn9yBDd/J0f/sb78IY+vFgwlaRk0BBrpYQ7HNgXyYt3LenSX2u4KPU
NkmcLXysaqdXqmVhS+ZiV8JpB6yFh/LQV6ZnapTAY0uOjTmAtpIhLp01a56eH000
HbKy9GpBI+6125gjT48u/OXAl6q2OTgyhj6E++63QWWVqMBiA+69c1IYqEaudiR5
rGl/bXyKlu9WD+AkKTqVLj6ZGCgRs1dtEohNKT4d/NsxEm+jAqQ=
=XZc3
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.