summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar http://joeyh.name/ <http://joeyh.name/@web>2013-11-14 17:06:52 +0000
committerGravatar admin <admin@branchable.com>2013-11-14 17:06:52 +0000
commit869bb58671a56693855cbcebc3e5bad3954dc472 (patch)
tree97afe0c3bb2ed6623e5165f16337bdafd31e3742
parent67e78a32b37e64ad4b33b6d78968186ca11f7ad1 (diff)
Added a comment
-rw-r--r--doc/bugs/Incorrect_merge__44___direct_repos___40__2__41__/comment_1_15c354c4841d364e78882d2b46a0a764._comment66
1 files changed, 66 insertions, 0 deletions
diff --git a/doc/bugs/Incorrect_merge__44___direct_repos___40__2__41__/comment_1_15c354c4841d364e78882d2b46a0a764._comment b/doc/bugs/Incorrect_merge__44___direct_repos___40__2__41__/comment_1_15c354c4841d364e78882d2b46a0a764._comment
new file mode 100644
index 000000000..53c9f7915
--- /dev/null
+++ b/doc/bugs/Incorrect_merge__44___direct_repos___40__2__41__/comment_1_15c354c4841d364e78882d2b46a0a764._comment
@@ -0,0 +1,66 @@
+[[!comment format=mdwn
+ username="http://joeyh.name/"
+ ip="209.250.56.246"
+ subject="comment 1"
+ date="2013-11-14T17:06:50Z"
+ content="""
+I verify this bug. And it's specific to direct mode as you say. Here is a shell script which automates the proccess:
+
+[[!format sh \"\"\"
+#!/bin/sh
+set -e
+mkdir test
+cd test
+git init a
+
+cd a
+git annex init
+git annex direct
+touch firstfile
+git annex add firstfile
+git annex sync # think this was left out of recipe
+
+cd ..
+
+git clone a b
+cd b
+git annex direct
+echo bbbb > f
+git annex add f
+git annex sync || true
+cd ..
+cd a
+mkdir f
+echo aaaa > f/f
+git annex add f/f
+git annex sync || true
+cd ..
+cd b
+git annex sync
+echo \"after merge:\"
+ls
+\"\"\"]]
+
+At this point, b only has the file version of f; the directory form has been removed. (Syncing to a of course then does the same thing there.)
+
+And from the trascript, we can see what's going on:
+
+<pre>
+Adding f/f
+CONFLICT (directory/file): There is a directory with name f in HEAD. Adding f as f~refs_heads_synced_master
+Automatic merge failed; fix conflicts and then commit the result.
+(Recording state in git...)
+f: needs merge
+[master 0600854] git-annex automatic merge conflict fix
+
+ Merge conflict was automatically resolved; you may want to examine the result.
+</pre>
+
+The problem seems to be that direct mode merge does not find the `f~refs_heads_synced_master` created by the merge, so fails to copy it from the temp merge tree into the work tree.
+
+`Command.Sync.cleanConflictCruft` is relevant, but was only made to work in indirect mode, it seems.
+
+----
+
+Obviously, if someone runs into this bug and seems to lose data, they can get the data back by reverting the changes from the automatic merge. Direct mode does preserve file contents when removing them from the work tree in a merge.
+"""]]