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

Re: [RFH] CE_REMOVE conversion

From
Linus Torvalds <torvalds@linux-foundation.org>
Date
Feb 21, 2008, 16:05 UTC
Message-ID
<alpine.LFD.1.00.0802210746410.7833@woody.linux-foundation.org>
In-Reply-To
<7v7igywvnj.fsf@gitster.siamese.dyndns.org>
On Thu, 21 Feb 2008, Junio C Hamano wrote:
> 
> but I am wondering if we should instead really _remove_ entries
> from the index instead, just like the attached patch.

Absolutely. I think that your patch is "ObviouslyCorrect(tm)", and that code should never have used CE_REMOVE in the first place. The fact that the old code worked was perhaps intentional, but still very subtle and lucky.

The whole (and only) point of CE_REMOVE was and is to do the "-u" handling when resolving a merge, and keep the thing in the index in order to later still do work with it (ie remove it) when we have verified that the index is complete. But that's not what "read_cache_unmerged()" is about: it's very explicitly documented to just ignore the unmerged entries.

So your patch looks very good to me. Basically, the merge code absolutely does not want to be called with some entries already marked as CE_REMOVE (it's supposed to *add* those markers as part of resolving the merge, but it is not able to handle them in the source).

So ack, ack, ack.
			Linus
Previous: Linus TorvaldsNext: Junio C Hamano
Message 6 of 10 in “[RFH] CE_REMOVE conversion”
  1. Junio C HamanoFeb 21, 2008
  2. [RFH] index_name_exists() conversionJunio C Hamano, Feb 21, 2008
  3. Linus TorvaldsFeb 21, 2008
  4. Johannes SchindelinFeb 21, 2008
  5. Linus TorvaldsFeb 21, 2008
  6. Linus TorvaldsFeb 21, 2008
  7. Junio C HamanoFeb 21, 2008
  8. Linus TorvaldsFeb 21, 2008
  9. Linus TorvaldsFeb 21, 2008
  10. Junio C HamanoFeb 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.