summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2011-06-20 15:22:07 -0400
committerGravatar Joey Hess <joey@kitenet.net>2011-06-20 21:37:18 -0400
commit91e50782ce6d634ffc8c2f809c80b6d4ff94a5ca (patch)
tree378e98a4fc42cdbad620c31548b5607de40583cd
parent2fcb8e3b11cdbb9de253050c1fbb6f08ef1071e2 (diff)
thought
-rw-r--r--doc/todo/branching.mdwn22
1 files changed, 22 insertions, 0 deletions
diff --git a/doc/todo/branching.mdwn b/doc/todo/branching.mdwn
index 3a7a2d3ca..9c44c03fe 100644
--- a/doc/todo/branching.mdwn
+++ b/doc/todo/branching.mdwn
@@ -135,3 +135,25 @@ Problem: Notes are usually attached to git
objects, and there are no git objects corresponding to git-annex keys.
Problem: Notes are not normally copied when cloning.
+
+------
+
+## elminating the merge problem
+
+Most of the above options are complicated by the problem of how to merge
+changes from remotes. It should be possible to deal with the merge
+problem generically. Something like this:
+
+* We have a local branch `B`.
+* For remotes, there are also `origin/B`, `otherremote/B`, etc.
+* To merge two branches `B` and `foo/B`, construct a merge commit that
+ makes each file have all lines that were in either version of the file,
+ with duplicates removed (probably). Do this without checking out a tree,
+ or using a temporary directory. (One easy but expensive way is to just
+ check out the branch to a temp dir, union merge into it, and remove the
+ temp dir ... but it should be possible to do it without using a temp dir.)
+* As a `post-merge` hook, merge `*/B` into `B`. This will ensure `B`
+ is always up-to-date after a pull from a remote.
+* When pushing to a remote, nothing need to be done, except ensure
+ `B` is either successfully pushed, or the push fails (and a pull needs to
+ be done to get the remote's changes merged into `B`).