From 2e92648383b8a6acbe687db610aae1b2f56ade63 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 9 Feb 2017 16:13:02 -0400 Subject: [PATCH] comment --- ..._ded83da89e70cadfa4076de9ddc36b55._comment | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 doc/todo/Alternative_mode_control_for_import/comment_5_ded83da89e70cadfa4076de9ddc36b55._comment diff --git a/doc/todo/Alternative_mode_control_for_import/comment_5_ded83da89e70cadfa4076de9ddc36b55._comment b/doc/todo/Alternative_mode_control_for_import/comment_5_ded83da89e70cadfa4076de9ddc36b55._comment new file mode 100644 index 0000000000..8e5471c310 --- /dev/null +++ b/doc/todo/Alternative_mode_control_for_import/comment_5_ded83da89e70cadfa4076de9ddc36b55._comment @@ -0,0 +1,27 @@ +[[!comment format=mdwn + username="joey" + subject="""comment 5""" + date="2017-02-09T19:45:26Z" + content=""" +I feel that the problem with this idea is that the suggested +actions "create symlinks (s), inject content (i) and delete from source (d)" +are only an approximation of how import is implemented. If they perfectly +matched the implementation, then import could treat them as a DSL and +simply evaluate the expression to do its work. But it's not that simple. +For one thing, --deduplicate and --clean-duplicates don't simply "delete from source" the +duplicates; they first check that numcopies can be satisfied. The default +import behavior doesn't "sid", in fact it moves from source to the work tree +(thus implicitly deleting from source first), then injects, and then creates +the symlink. Everything has dependencies and interrelationships, and the best +way I've found to express that so far is as the Haskell code in +Command/Import.hs. + +Even exposing that interface and using the current implementation for +particular canned expressions seems risky; exposing imperfect abstractions +can shoot you in the foot later when something under the abstraction needs +to change. + +So I'd rather improve the documentation for git-annex import if it is +unclear. Not opposed to finding a way to work in these "Dsid,Nsid" +summaries to the the documentation. +"""]] -- 2.30.2