Thread (25 messages) flat view 25 messages, 3 authors, 2016-06-15

Re: [PATCH v3 07/13] add range clone functions

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:49:07

Bo Yang [off-list ref] writes:
Both single range clone and deeply clone are supported.
Please explain what you mean by "deeply clone" (no, not just a language
nitpick that it should at least be "deep clone"), and document which one
needs to be used in what situations to help people who would want to
decide which of these functions to call.

What I am trying to get at is that you might want to have only one kind of
clone that is _semantically_ deep (i.e. the list is copied, but the
elements are shared with refcounting), but makes a copy of the element
that is being updated on demand (i.e.  have an API function to allow users
to modify, which internally does copy-on-write if it is still shared).  I
don't know that kind of arrangement makes sense; it depends on how the
cloned ranges are used but I haven't looked at the callers.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help