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

Re: [PATCH] builtin-merge: missing structure bzero.

From
Pierre Habouzit <madcoder@debian.org>
Date
Jul 21, 2008, 18:18 UTC
Message-ID
<20080721181850.GA2718@artemis.madism.org>
In-Reply-To
<20080721172119.GE32057@genesis.frugalware.org>
On Mon, Jul 21, 2008 at 05:21:19PM +0000, Miklos Vajna wrote:
Show 24 quoted lines
> On Mon, Jul 21, 2008 at 07:03:50PM +0200, Pierre Habouzit <madcoder@debian.org> wrote:
> > This cause segfaults when replacing a directory with a submodule in a
> > fast-forward.
> 
> Thanks.
> 
> > +test_expect_failure 'Replace a directory with a submodule, with a file conflict' '
> > +	mkdir test &&
> > +	cd test &&
> > +	: create our repository with a sub/a file &&
> > +	git init &&
> > +	mkdir sub && echo a > sub/a &&
> > +	git add sub && git commit -asm"initial repository" &&
> > +	: save this state in a new branch &&
> > +	git branch temp &&
> > +	: then replace sub with it &&
> > +	git rm -rf sub &&
> > +        git submodule add -- "$(pwd)/../submodule/.git/" sub &&
> > +	git commit -asm "replace sub/ with a submodule" &&
> > +	: then try to update the "temp" branch &&
> > +	git checkout temp &&
> 
> It seems this one fails. I guess this will be a problem in the low-level
> merge code (read-tree -m) and not in builtin-merge.
  Yeah, I saw that afterwards, the error was misleading (as it tells
about some "merge" issue), but when I tried to debug it, it was indeed
in git checkout. The easiest way to reproduce, is to have a submodule
that replace a file that was previously versionned (which is something
that will happen in real life when you take out a subdirectory of a
project to make it live into a submodule) and that you then git checkout
HEAD~1.
-- 
·O·  Pierre Habouzit
··O                                                madcoder@debian.org
OOO                                                http://www.madism.org
Previous: Miklos VajnaNext: Pierre Habouzit
Message 3 of 4 in “builtin-merge: missing structure bzero.”
  1. builtin-merge: missing structure bzero.Pierre Habouzit, Jul 21, 2008
  2. Miklos VajnaJul 21, 2008
  3. Pierre HabouzitJul 21, 2008
  4. Pierre HabouzitJul 21, 2008

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.