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

diff-index --cached on bare repository

From
Johannes Gilger <heipei@hackvalue.de>
Date
Jan 30, 2009, 16:13 UTC
Message-ID
<glv901$c5v$1@ger.gmane.org>
Hi list,

today I stumbled over the output of "git diff-index --cached HEAD" in a bare repository. While diff-index HEAD just reminds me that I got to have a work-tree, --cached outputs all the files in HEAD as deleted. The question is if this is intended behaviour? Or is it irrelevant because diff-index is only plumbing? I found a mail of the gitk-team working around this, which is funny because I discovered this while working on GitX.

So please, enlighten me ;)

Greetings, Jojo

-- 
Johannes Gilger <heipei@hackvalue.de>
http://hackvalue.de/heipei/
GPG-Key: 0x42F6DE81
GPG-Fingerprint: BB49 F967 775E BB52 3A81  882C 58EE B178 42F6 DE81
Next: Jeff King
Message 1 of 2 in “diff-index --cached on bare repository”
  1. Johannes GilgerJan 30, 2009
  2. Jeff KingJan 30, 2009

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.