Git development
 help / color / mirror / Atom feed
* regarding "git status"
@ 2010-05-13 13:56 Terrence Brannon
  2010-05-13 14:17 ` Randal L. Schwartz
  2010-05-13 14:20 ` Matthieu Moy
  0 siblings, 2 replies; 3+ messages in thread
From: Terrence Brannon @ 2010-05-13 13:56 UTC (permalink / raw)
  To: git

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? shouldnt this sentence say: "displays paths that have been
added to the index"

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: regarding "git status"
  2010-05-13 13:56 regarding "git status" Terrence Brannon
@ 2010-05-13 14:17 ` Randal L. Schwartz
  2010-05-13 14:20 ` Matthieu Moy
  1 sibling, 0 replies; 3+ messages in thread
From: Randal L. Schwartz @ 2010-05-13 14:17 UTC (permalink / raw)
  To: Terrence Brannon; +Cc: git

>>>>> "Terrence" == Terrence Brannon <schemelab@gmail.com> writes:

Terrence> In the manpage for git-status
Terrence> (http://www.kernel.org/pub/software/scm/git/docs/git-status.html) it says:

Terrence> "Displays paths that have differences between the index file
Terrence> and the current HEAD commit"

Terrence> but how could something be added to the index and not be
Terrence> different from the current HEAD commit? shouldnt this sentence
Terrence> say: "displays paths that have been added to the index"

The HEAD commit might have changed without changing the index via
something like "git reset --soft $sha1".  So yes, either the index or
the head might have changed, and this is reporting the differences
between them.

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc.
See http://methodsandmessages.vox.com/ for Smalltalk and Seaside discussion

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: regarding "git status"
  2010-05-13 13:56 regarding "git status" Terrence Brannon
  2010-05-13 14:17 ` Randal L. Schwartz
@ 2010-05-13 14:20 ` Matthieu Moy
  1 sibling, 0 replies; 3+ messages in thread
From: Matthieu Moy @ 2010-05-13 14:20 UTC (permalink / raw)
  To: Terrence Brannon; +Cc: git

Terrence Brannon <schemelab@gmail.com> writes:

> 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/

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-05-13 14:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-13 13:56 regarding "git status" Terrence Brannon
2010-05-13 14:17 ` Randal L. Schwartz
2010-05-13 14:20 ` Matthieu Moy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox