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

Re: [PATCH] fix bug in read-cache.c which loses files when merging a tree

From
Linus Torvalds <torvalds@osdl.org>
Date
Apr 18, 2005, 19:25 UTC
Message-ID
<Pine.LNX.4.58.0504181219480.15725@ppc970.osdl.org>
In-Reply-To
<1113848239.4998.45.camel@mulgrave>
On Mon, 18 Apr 2005, James Bottomley wrote:
Show 6 quoted lines
>
> I noticed this when I tried a non-trivial scsi merge and checked the
> results against BK.  The problem is that remove_entry_at() actually
> decrements active_nr, so decrementing it in add_cache_entry() before
> calling remove_entry_at() is a double decrement (hence we lose cache
> entries at the end).
Thanks. Just before I was going to hit the same issue, too.

I've pushed out my first real content merge: since Daniel Barkalow's object model stuff didn't apply to my tree any more (I had added the commit type tracking to mine after Daniel did his conversion), I instead applied his series to the place they were done against, and used git to merge the result with my current top-of-tree.

I based it on the two example scripts I had sent out, but obviously never tested until this point (since both of them had some serious syntax errors, and thus clearly wouldn't work).

I also checked in the stupid scripts, in the expectation that somebody else can improve on them and make them useful. For example, firing up an editor when the merge fails is probably a damn good idea.

Anyway, it seems to prove the concept of a real three-way merge, and it all actually worked exactly the way I envisioned. Whether the end result works or not, that's a different issue ;)

			Linus
Previous: James BottomleyNext: Linus Torvalds
Message 2 of 5 in “fix bug in read-cache.c which loses files when merging a tree”
  1. fix bug in read-cache.c which loses files when merging a treeJames Bottomley, Apr 18, 2005
  2. Linus TorvaldsApr 18, 2005
  3. Linus TorvaldsApr 18, 2005
  4. Petr BaudisApr 18, 2005
  5. Linus TorvaldsApr 18, 2005

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.