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

Re: regarding "git status"

From
Matthieu Moy <matthieu.moy@grenoble-inp.fr>
Date
May 13, 2010, 14:20 UTC
Message-ID
<vpqtyqbc28f.fsf@bauges.imag.fr>
In-Reply-To
<loom.20100513T155553-871@post.gmane.org>
Terrence Brannon <schemelab@gmail.com> writes:
Show 8 quoted lines
> In the manpage for git-status
> (http://www.kernel.org/pub/software/scm/git/docs/git-status.html) it says:
>
> "Displays paths that have differences between the index file and the current
> HEAD commit"
>
> but how could something be added to the index and not be different from the
> current HEAD commit?

The index doesn't contain the _differences_ between what you're about to commit and HEAD, it contains _all_ the content you're going to commit, i.e. if you have no new stuff to commit, it contains the same thing as HEAD (in a slightly different form: HEAD uses just the object database, while .git/index is roughly an array of files).

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
Previous: Randal L. Schwartz
Message 3 of 3 in “regarding "git status"”
  1. Terrence BrannonMay 13, 2010
  2. Randal L. SchwartzMay 13, 2010
  3. Matthieu MoyMay 13, 2010

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.