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
Jonathan Nieder <jrnieder@gmail.com>
Date
Jan 7, 2011, 23:00 UTC
Message-ID
<20110107230017.GA15495@burratino>
In-Reply-To
<20110107183226.GG6040@onerussian.com>
Yaroslav Halchenko wrote [abbreviated]:
Show 16 quoted lines
> 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
> 160000 a2b5787 2   frontiers/code
> %         git diff-tree todonotloose
> a00c497
> :040000 040000 40427e34 c7ba910 M	poster-hbm2011_neurodebian
> %         git diff-tree todonotloose^ HEAD
> :100644 100644 378e137 c39ced7 M	.gitmodules
> :000000 040000 0000000 141dbc1 A	challenge-execpapers
> :040000 040000 401fd66 ee190f0 M	frontiers
> :040000 040000 26c884a ad3e829 M	sty

One more piece of protocol: what git version are you using? The release notes mention a fix in this area in v1.7.3[1]:

 * "git merge -s recursive" (which is the default) did not handle cases
   where a directory becomes a file (or vice versa) very well.
Hopefully this is that.  In any case, sounds like a bug.

(Hopefully someone else can comment on why cherry-pick uses the merge machinery to notice conflicts that would not be clear from the patch alone.)

Thanks again. Jonathan

[1] There is an updated Debian source package at [2]. Or, probably faster: one can use the build result in bin-wrappers/ from a git.git clone in place. [2] http://mentors.debian.net/debian/pool/main/g/git/git_1.7.4~rc1-0.1.dsc

Previous: Yaroslav HalchenkoNext: Yaroslav Halchenko
Message 4 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.