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

Re: git-status producing incorrect results

From
Jeff King <peff@peff.net>
Date
Feb 14, 2008, 17:02 UTC
Message-ID
<20080214170250.GB28059@coredump.intra.peff.net>
In-Reply-To
<20080214165432.GA28059@coredump.intra.peff.net>
On Thu, Feb 14, 2008 at 11:54:32AM -0500, Jeff King wrote:
Show 13 quoted lines
> diff --git a/t/t7502-status.sh b/t/t7502-status.sh
> index b64ce30..11e5655 100755
> --- a/t/t7502-status.sh
> +++ b/t/t7502-status.sh
> @@ -128,4 +128,8 @@ test_expect_success 'status without relative paths' '
>  
>  '
>  
> +test_expect_success 'status of partial commit excluding new file in index' '
> +	git status modified
> +'
> +
>  test_done

Actually, this only finds the problem in the current 'next', where git-status barfs with an error, and not in the first commit that exhibits the problem, where only the results are incorrect.

I tried making a "git commit" test, but it seems that the commit actually happens correctly (although if you do not specify -m, it does a run_status, and ends up barfing). So the problem really is that the index is screwed up after we decide what to commit but before we do the status.

-Peff
Previous: Johannes SchindelinNext: Linus Torvalds
Message 5 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.