summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2013-11-14 13:50:19 -0400
committerGravatar Joey Hess <joey@kitenet.net>2013-11-14 13:50:19 -0400
commit3e3c6597cf226803b93fd661fd3ee43dc7d630f0 (patch)
treefdcf31c5f3cad7748f890a343455f755fe874634 /doc
parent07b1a6467298d740e03c3c1b9b5e9a4dbef84ecb (diff)
parent17f7cfff2b4a8f613dbbd4e0c7b15962f765b967 (diff)
Merge branch 'master' of ssh://git-annex.branchable.com
Diffstat (limited to 'doc')
-rw-r--r--doc/bugs/Incorrect_merge__44___direct_repos___40__2__41__/comment_1_15c354c4841d364e78882d2b46a0a764._comment66
-rw-r--r--doc/bugs/Incorrect_merge___40__a_special_case__41__/comment_1_c80418d76b501c688e3a9fb4831520fd._comment41
2 files changed, 107 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.
+"""]]
diff --git a/doc/bugs/Incorrect_merge___40__a_special_case__41__/comment_1_c80418d76b501c688e3a9fb4831520fd._comment b/doc/bugs/Incorrect_merge___40__a_special_case__41__/comment_1_c80418d76b501c688e3a9fb4831520fd._comment
new file mode 100644
index 000000000..0594ddabe
--- /dev/null
+++ b/doc/bugs/Incorrect_merge___40__a_special_case__41__/comment_1_c80418d76b501c688e3a9fb4831520fd._comment
@@ -0,0 +1,41 @@
+[[!comment format=mdwn
+ username="http://joeyh.name/"
+ ip="209.250.56.246"
+ subject="comment 1"
+ date="2013-11-14T17:10:55Z"
+ content="""
+I suspect this might be the same underlying problem as [[bugs/Incorrect merge, direct repos (2)]]. However, I cannot reproduce it using the recipe given.. perhaps something was left out?
+
+I wrote this shell script to try to codify the recipe in a runnable form:
+
+[[!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
+echo aaaa > f
+git annex add f
+git annex sync
+\"\"\"]]
+
+At this point, a has 2 variants of f, and no amount of syncing in either repo will cause either variant to go away.
+"""]]