From: Jonathan Nieder <jrnieder@gmail.com>
To: Yaroslav Halchenko <debian@onerussian.com>
Cc: git@vger.kernel.org, Elijah Newren <newren@gmail.com>
Subject: Re: problem with cherry-picking a commit which comes before introducing a new submodule
Date: Fri, 7 Jan 2011 12:15:01 -0600 [thread overview]
Message-ID: <20110107181501.GA28980@burratino> (raw)
In-Reply-To: <20110107172432.GA6040@onerussian.com>
(+cc: Elijah Newren, who has worked on some of this code)
Yaroslav Halchenko wrote:
> In our repository we had some submodules, then there was a branch off
> (call new branch todonotloose) with a single commit. In the master we
> had some other commits and moved one of the subdirectories into a
> submodule.
>
> Later on we decided to cherry pick todonotloose into master but
> cherry-pick fails despite the fact that 'git show todonotloose | patch
> -p1' applies just fine, ie there were no changes touching any of the
> submodules.
[...]
> $> git status
> # On branch master
> # Changes to be committed:
> # (use "git reset HEAD <file>..." to unstage)
> #
> # new file: poster-hbm2011_neurodebian/abstract.txt
> # modified: poster-hbm2011_neurodebian/jb.txt
> #
> # Unmerged paths:
> # (use "git reset HEAD <file>..." to unstage)
> # (use "git add/rm <file>..." as appropriate to mark resolution)
> #
> # added by us: frontiers/code
> #
As contrib/examples/git-revert.sh explains, the heart of "git
cherry-pick" is
base=todonotloose^
next=todonotloose
head=HEAD
git merge-recursive $base -- $head $next
Could you try that, perhaps with GIT_MERGE_VERBOSITY=4 (or some other
number from 1 to 5, larger is louder) in the environment? For context,
git ls-files -u; # after the merge
git diff-tree todonotloose
git diff-tree todonotloose^ HEAD
would also be interesting.
next prev parent reply other threads:[~2011-01-07 18:15 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-07 17:24 problem with cherry-picking a commit which comes before introducing a new submodule Yaroslav Halchenko
2011-01-07 18:15 ` Jonathan Nieder [this message]
2011-01-07 18:32 ` Yaroslav Halchenko
2011-01-07 23:00 ` Jonathan Nieder
2011-01-07 23:48 ` Yaroslav Halchenko
2011-01-08 0:01 ` Yaroslav Halchenko
2011-01-11 13:27 ` Jonathan Nieder
2011-01-18 16:02 ` Yaroslav Halchenko
2011-01-18 16:08 ` Andreas Ericsson
2011-01-18 16:20 ` Yaroslav Halchenko
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=20110107181501.GA28980@burratino \
--to=jrnieder@gmail.com \
--cc=debian@onerussian.com \
--cc=git@vger.kernel.org \
--cc=newren@gmail.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).