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

Re: git bug?

From
Junio C Hamano <junkio@cox.net>
Date
Jun 9, 2005, 08:15 UTC
Message-ID
<7vmzq0osia.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<42A7F769.2050800@pobox.com>
>>>>> "JG" == Jeff Garzik <jgarzik@pobox.com> writes:

JG> 'git-diff-cache -p HEAD' should not show files that I have not modified. JG> This screws up JG> git-diff-cache -p HEAD | diffstat -p1 | awk '{print $1}' JG> for example.

Agreed 100%. If there is a file exists (rather, if the git thinks the file is there), then diff-cache should not say it is deleted. That would be wrong.

Sorry for not having a crystal ball to poke into your terminal, so let me get something straight. I am still unsure the problem you are reporting is coming from diff-cache bug, or somehow yesterday's (well it is 01:13AM where I sit ;-)) merge updates trashed your work tree or index file, so these questions would help me tell which. When "diff-cache" reports the file "deleted":

 - Do you have that arch/arm/mm/minicache.c file in your working
   directory?
 - Does git-ls-files know about the file?  Does the path show in:
   git-ls-files --stage | grep arch/arm/mm/minicache.c
 - Does the HEAD tree have the path as well?  Does it show in:
   git-ls-tree -r HEAD | grep arch/arm/mm/minicache.c
Previous: Jeff Garzik
Message 5 of 5 in “git bug?”
  1. Jeff GarzikJun 9, 2005
  2. Jeff GarzikJun 9, 2005
  3. Junio C HamanoJun 9, 2005
  4. Jeff GarzikJun 9, 2005
  5. Junio C HamanoJun 9, 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.