by EGreg · 15y ago · 0 comments
git fetch <project-to-union-merge>
GIT_INDEX_FILE=.git/tmp-index git-read-tree FETCH_HEAD
GIT_INDEX_FILE=.git/tmp-index git-checkout-cache -a -u
git-update-cache --add -- (GIT_INDEX_FILE=.git/tmp-index git-ls-files)
cp .git/FETCH_HEAD .git/MERGE_HEAD
git commit
instead of this: hg pull --force <project-to-union-merge>
hg merge
hg commit
Mercurial "just works", and its commands are less arcane.To be fair, git is now much easier to use. But also to be fair, mercurial has become much more powerful. In mercurial, doing straightforward things is simple, and doing complicated things is more complex, which is the way it should be IMHO
It even has rebase, although one might argue that is not a great differentiating feature for a REPOSITORY
Why would I have to type that? I have been using git for 4 years and never had to type git-update-cache --add or copying .git/FETCH_HEAD. Are you spreading FUD?
Try using patch queues for a while and tell me that Mercurial "just works" and isn't arcane. Nonsense.
What you're doing in git actually makes sense, since a normal pull is just fetch+checkout+merge+commit, you have to go into the plumbing and trick every step of the way to fetch, checkout, and merge using the wrong repositories. In the future, this could be made porcelain as it has been in hg, but do people really want to do this? It's much safer and saner to use submodules for 99% of use cases.