git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Sixt <j.sixt@viscovery.net>
To: Sjors Gielen <dazjorz@dazjorz.com>
Cc: git@vger.kernel.org, Diederik van der Boor <vdboor@codindomain.com>
Subject: Re: Merging a commit from a distant branch, cherry-pick seems to fail
Date: Tue, 08 Jun 2010 07:57:28 +0200	[thread overview]
Message-ID: <4C0DDBC8.9030909@viscovery.net> (raw)
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 <file>..." 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 <file>..." to unstage)
> #   (use "git add/rm <file>..." 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 (<http://git.pastebin.com/dUntbHDV>). 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

  reply	other threads:[~2010-06-08  5:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-07 22:46 Merging a commit from a distant branch, cherry-pick seems to fail Sjors Gielen
2010-06-08  5:57 ` Johannes Sixt [this message]
2010-06-08 11:34   ` [PATCH] merge-recursive: demonstrate an incorrect conflict with submodule Johannes Sixt
2010-06-08 11:58     ` Johannes Sixt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4C0DDBC8.9030909@viscovery.net \
    --to=j.sixt@viscovery.net \
    --cc=dazjorz@dazjorz.com \
    --cc=git@vger.kernel.org \
    --cc=vdboor@codindomain.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).