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

Re: git-status producing incorrect results

From
Linus Torvalds <torvalds@linux-foundation.org>
Date
Feb 14, 2008, 17:04 UTC
Message-ID
<alpine.LFD.1.00.0802140902470.6110@woody.linux-foundation.org>
In-Reply-To
<20080214164505.GA21932@coredump.intra.peff.net>
On Thu, 14 Feb 2008, Jeff King wrote:
> 
> The patch below fixes it by discarding and re-reading the index if we
> are doing a partial commit
ACK. The partial commit case really should discard the index.
>                            but I suspect it may just be papering over
> the problem again. We probably need to have two separate index_states,
> and pass in the correct one to wt-status (rather than giving it the
> filename and having it read into the_index).

ACK again, that's almost certainly the right long-term fix, but it essentially requires a "copy_index()" thing that creates a new index from an existing copy (so that we don't need to re-read it) etc infrastructure changes, so I think your patch is the correct one for now.

		Linus
Previous: Jeff KingNext: Jeff King
Message 6 of 7 in “git-status producing incorrect results”
  1. Jeff KingFeb 14, 2008
  2. Johannes SchindelinFeb 14, 2008
  3. Jeff KingFeb 14, 2008
  4. Johannes SchindelinFeb 14, 2008
  5. Jeff KingFeb 14, 2008
  6. Linus TorvaldsFeb 14, 2008
  7. Jeff KingFeb 14, 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.