On Mon, 13 May 2013 18:35:35 +0000, Bob Archer wrote:
...
> Been a while since I have really got into the git internals, but I think each 
> changeset has a SHA1 hash... if a changeset with that hash is already in a 
> branch merging won't do anything... there will be nothing to merge. 
> That said, I don't even think you can specify in git "what" to merge it just 
> merges all the changes.

Right; there is no list of commits that got merged, but only a second
parent pointer in the merge commit that points to the (then) head of
the branch.

> I think it is possible to do a cherry-pick, but I think that creates a diff 
> basically and applies that to the target.

Yes, except that it actually does a three-way merge with the current
branch head and the cherry-picked commit as the ends and the parent of
the cherry-pick commit as the base - this is more robust than applying
a patch.

Andreas

-- 
"Totally trivial. Famous last words."
From: Linus Torvalds <torvalds@*.org>
Date: Fri, 22 Jan 2010 07:29:21 -0800

Reply via email to