From: Johannes Sixt Date: Tue, 08 Jun 2010 05:57:28 GMT Subject: Re: Merging a commit from a distant branch, cherry-pick seems to fail Message-ID: <4C0DDBC8.9030909@viscovery.net> In-Reply-To: <4C1009EE-3A67-4DF9-9F45-493CD463AEF9@dazjorz.com> Am 6/8/2010 0:46, schrieb Sjors Gielen: > sjors@smbp:~/Projecten/kmess/git$ git log -1 --name-only --oneline f9380fd43a2c1 > f9380fd 2010-06-03 (Sjors) (noknotify branch) > ChangeLog > src/CMakeLists.txt > src/notification/macnotification.cpp > src/notification/macnotification.h > src/notification/notificationmanager.cpp > src/notification/notificationmanager.h ... > sjors@smbp:~/Projecten/kmess/git$ git status > # On branch kmess-2.0.x > # Changes to be committed: > # (use "git reset HEAD ..." to unstage) > # > # modified: src/CMakeLists.txt > # new file: src/notification/macnotification.cpp > # new file: src/notification/macnotification.h > # modified: src/notification/notificationmanager.cpp > # > # Unmerged paths: > # (use "git reset HEAD ..." to unstage) > # (use "git add/rm ..." as appropriate to mark resolution) > # > # both modified: ChangeLog > # added by us: contrib/isf-qt > # both modified: src/notification/notificationmanager.h > # ... > I'd have expected git cherry-pick to simply take the changes in commit > f9380fd43 and apply them to kmess-2.0.x, without pulling along history > in 'master'. Testing and debugging in the #git channel on Freenode didn't > show what I was doing wrong (). Now I > could just take the patch with 'git show' and use 'git apply' to apply it, > but that doesn't seem like the Git way to do this. So the question is: > does any of you know why this is happening, what I'm doing wrong, and what > I should do instead? You did nothing wrong. If at all, there is a bug in git. The *only* curious thing after your cherry-pick is this: > # added by us: contrib/isf-qt because contrib/isf-qt is not touched by the commit that you are cherry-picking. contrib/isf-qt is a submodule on branch kmess-2.0.x, but it is a regular directory on master. I don't think that git should report it as a conflict. To go ahead, simply resolve the conflicts in ChangeLog and notificationmanager.h, and make sure that you do not have staged any changes to contrib/isf-qt before you commit. -- Hannes