summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2017-03-06 12:56:08 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2017-03-06 12:56:08 -0400
commitb810f6903b7941f82b180f6399025b4266ee1c57 (patch)
tree4eafe1596ab1c6001651752dfae73de30e1c0e37
parentc3f272155e8f44021f7cb0b29b6462d2bf9db99d (diff)
comment
-rw-r--r--doc/bugs/git_annex_import_is_dangerous_if_you_have_unused_objects/comment_5_1e737b740bc7d95f3329e3481d55fd35._comment20
1 files changed, 20 insertions, 0 deletions
diff --git a/doc/bugs/git_annex_import_is_dangerous_if_you_have_unused_objects/comment_5_1e737b740bc7d95f3329e3481d55fd35._comment b/doc/bugs/git_annex_import_is_dangerous_if_you_have_unused_objects/comment_5_1e737b740bc7d95f3329e3481d55fd35._comment
new file mode 100644
index 000000000..89b088f14
--- /dev/null
+++ b/doc/bugs/git_annex_import_is_dangerous_if_you_have_unused_objects/comment_5_1e737b740bc7d95f3329e3481d55fd35._comment
@@ -0,0 +1,20 @@
+[[!comment format=mdwn
+ username="joey"
+ subject="""comment 5"""
+ date="2017-03-06T16:25:53Z"
+ content="""
+The difficulty with checking if the content to be imported is referred to
+somewhere in the working tree is that there's no inexpensive way to
+determine that. It would have to run `git log -n1 -S$KEY` for each file.
+That can take quite a long time in repositories with a lot of history.
+I clocked it at 12 seconds per file on an SSD; will be quite a
+lot slower on a disc.
+
+I suppose that check could be added with a --fast to skip the check.
+
+PS, mbroadhead's is a good approach. Note though that the dropunused content
+will be considered a duplicate by import since git-annex
+version 6.20170214. Still, --deduplicate and --clean-duplicates won't
+delete the files from the import location in this case, since there
+are no copies of the content in the annex.
+"""]]