Commit graph

7 commits

Author SHA1 Message Date
Joey Hess
cfe0894736 merge bugfix
Use GitRepo functions to call git, the bug occurred when it was run
in a git repo that was not the same as the repo being acted on.
2011-06-22 20:35:09 -04:00
Joey Hess
1cca8b4edb rework core merge code
More likely to be 100% correct now, I think.
2011-06-22 13:59:42 -04:00
Joey Hess
7a693394f4 allow for union merges between a tree and the content in the index
This is needed for robust handling of the git-annex branch. Since changes
are staged to its index as git-annex runs, and committed at the end,
it's possible that git-annex is interrupted, and leaves a dirty index.

When it next runs, it needs to be able to merge the git-annex branch
as necessary, without losing the existing changes in the index.

Note that this assumes that the git-annex branch is only modified by
git-annex. Any changes to it will be lost when git-annex updates the
branch. I don't see a good, inexpensive way to find changes in
the git-annex branch that arn't in the index, and union merging the
git-annex branch into the index every time would likewise be expensive.
2011-06-21 20:12:53 -04:00
Joey Hess
5d20ac5800 export the commit function and generalize 2011-06-21 19:09:20 -04:00
Joey Hess
40ec8a9726 Branch module complete
Refactored some code that it needs into GitRepo.
2011-06-21 17:52:39 -04:00
Joey Hess
7e7428f173 refactor 2011-06-21 16:08:09 -04:00
Joey Hess
e735d459b5 moved to library 2011-06-21 14:09:06 -04:00