This commit is contained in:
Joey Hess 2011-06-20 15:22:07 -04:00
parent 2fcb8e3b11
commit 91e50782ce

View file

@ -135,3 +135,25 @@ Problem: Notes are usually attached to git
objects, and there are no git objects corresponding to git-annex keys. objects, and there are no git objects corresponding to git-annex keys.
Problem: Notes are not normally copied when cloning. 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`).