summaryrefslogtreecommitdiff
path: root/doc/bugs/clean-duplicates_causes_data_loss
diff options
context:
space:
mode:
authorGravatar CandyAngel <CandyAngel@web>2015-04-29 18:42:38 +0000
committerGravatar admin <admin@branchable.com>2015-04-29 18:42:38 +0000
commitc114950d1daa522bfd00fee4e679078c3dfcf144 (patch)
tree3db4532ccbb5d45f956026b842150d8addaf79cc /doc/bugs/clean-duplicates_causes_data_loss
parent673b7e0e40ca2cd7360ad89273d8c47c9006cc70 (diff)
Added a comment
Diffstat (limited to 'doc/bugs/clean-duplicates_causes_data_loss')
-rw-r--r--doc/bugs/clean-duplicates_causes_data_loss/comment_3_ed3f40b5798d9e770657e9c6b8e28039._comment62
1 files changed, 62 insertions, 0 deletions
diff --git a/doc/bugs/clean-duplicates_causes_data_loss/comment_3_ed3f40b5798d9e770657e9c6b8e28039._comment b/doc/bugs/clean-duplicates_causes_data_loss/comment_3_ed3f40b5798d9e770657e9c6b8e28039._comment
new file mode 100644
index 000000000..f4c367d9c
--- /dev/null
+++ b/doc/bugs/clean-duplicates_causes_data_loss/comment_3_ed3f40b5798d9e770657e9c6b8e28039._comment
@@ -0,0 +1,62 @@
+[[!comment format=mdwn
+ username="CandyAngel"
+ subject="comment 3"
+ date="2015-04-29T18:42:38Z"
+ content="""
+Well, yeah, it is quite surprising as you don't like git-annex messing about with files outside the annex, but one of the commands that does so will cause wanton destruction with barely any checks against data loss.
+
+Oddly, if the origin is marked as dead instead of untrusted, --clean-duplicates doesn't remove anything from /tmp/ga-icd/importme, even though 'import' still knows about the files and has enough information to delete them. Weird.
+
+ + mkdir /tmp/ga-icd
+ + cd /tmp/ga-icd
+ + git init origin
+ Initialized empty Git repository in /tmp/ga-icd/origin/.git/
+ + cd origin
+ + git commit -m create --allow-empty
+ [master (root-commit) 6cfdbc1] create
+ + git annex init origin
+ init origin ok
+ (recording state in git...)
+ + echo a
+ + echo b
+ + git annex add .
+ add a ok
+ add b ok
+ (recording state in git...)
+ + git commit -m files
+ [master 2c2ed64] files
+ 2 files changed, 2 insertions(+)
+ create mode 120000 a
+ create mode 120000 b
+ + mkdir /tmp/ga-icd/importme
+ + cd /tmp/ga-icd/importme
+ + echo a
+ + echo b
+ + echo c
+ + cd /tmp/ga-icd
+ + git clone origin import
+ Cloning into 'import'...
+ done.
+ + cd import
+ + git annex init import
+ init import (merging origin/git-annex into git-annex...)
+ ok
+ (recording state in git...)
+ + cd /tmp/ga-icd/origin
+ + git annex drop b --force
+ drop b ok
+ (recording state in git...)
+ + cd /tmp/ga-icd/import
+ + git annex dead origin
+ dead origin ok
+ (recording state in git...)
+ + git annex import --clean-duplicates /tmp/ga-icd/importme
+ + ls /tmp/ga-icd/import
+ a b
+ + ls /tmp/ga-icd/importme/
+ a b c
+
+I'm think I'm just going to steer clear of it completely (and roll my own) until it is as fussy about preserving data as the rest of git-annex.
+
+(Also, apologies for the original name, I didn't realise it would cause any problems.)
+"""]]