git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: problem with cherry-picking a commit which comes before introducing a new submodule

From
Yaroslav Halchenko <debian@onerussian.com>
Date
Jan 7, 2011, 18:32 UTC
Message-ID
<20110107183226.GG6040@onerussian.com>
In-Reply-To
<20110107181501.GA28980@burratino>

oy -- I thought that cherry-pick is primarily just application of the patch (without use of the merge clevernesses).

Here is the protocol: % export GIT_MERGE_VERBOSITY=4 % base=todonotloose^ % next=todonotloose % head=HEAD % % git merge-recursive $base -- $head $next Merging HEAD with todonotloose Merging: 855981d just placeholders in the abstract a00c497 Initial draft for HBM abstract. CONFLICT (file/directory): There is a directory with name frontiers/code in todonotloose. Adding frontiers/code as frontiers/code~HEAD % git ls-files -u; # after the merge 160000 a2b57871d2d79bef06ba6214739d82b9a63772a8 2 frontiers/code zsh: command not found: # % git diff-tree todonotloose a00c497fa399c00486c97121ed0b8fda72c7ce47 :040000 040000 40427e34a1ff89c458f2a5f262a108d46b4fa004 c7ba91028b1cef63f4f7eef70f0c4054b31e92b6 M poster-hbm2011_neurodebian % git diff-tree todonotloose^ HEAD :100644 100644 378e1379ec5ebb7abac59fec162b7238b5846525 c39ced763aeb5fd352cecd6fef1bfc40471f2246 M .gitmodules :000000 040000 0000000000000000000000000000000000000000 141dbc1bfe1be2eab77f04ca03f6f28feb372cca A challenge-execpapers :040000 040000 401fd66867de412b8653dc3a698bbaa45441bec1 ee190f09786f324abdda6e7a36e8278c201a20a0 M frontiers :040000 040000 26c884a67efb55bdf96d7453d9acd50cee36ae90 ad3e829d15b302c4342a6b2a9fb5dfede0ed77c9 M sty

On Fri, 07 Jan 2011, Jonathan Nieder wrote:
> 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.
-- 
Yaroslav O. Halchenko
Postdoctoral Fellow,   Department of Psychological and Brain Sciences
Dartmouth College, 419 Moore Hall, Hinman Box 6207, Hanover, NH 03755
Phone: +1 (603) 646-9834                       Fax: +1 (603) 646-1419
WWW:   http://www.linkedin.com/in/yarik        
Previous: Jonathan NiederNext: Jonathan Nieder
Message 3 of 10 in “problem with cherry-picking a commit which comes before introducing a new submodule”
  1. Yaroslav HalchenkoJan 7, 2011
  2. Jonathan NiederJan 7, 2011
  3. Yaroslav HalchenkoJan 7, 2011
  4. Jonathan NiederJan 7, 2011
  5. Yaroslav HalchenkoJan 7, 2011
  6. Yaroslav HalchenkoJan 8, 2011
  7. Jonathan NiederJan 11, 2011
  8. Yaroslav HalchenkoJan 18, 2011
  9. Andreas EricssonJan 18, 2011
  10. Yaroslav HalchenkoJan 18, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.