diff options
-rw-r--r-- | doc/todo/branching.mdwn | 22 |
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`). |