Re: Call Me Gitless
- From
Alexander E Genaud <alex@genaud.net>
- Date
- Aug 19, 2008, 10:09 UTC
- Message-ID
- <ee521d6f0808190309n7f0114a6q2e8113238cb2142b@mail.gmail.com>
- In-Reply-To
- <vpqk5edid2y.fsf@bauges.imag.fr>
Show 10 quoted lines
>> A single term for cache and index should be decided upon. > > +1 on this. > > I find "staging area" the most explicit wording for users, but I say > that as a non-native english speaker. > > Unfortunately, it's not only a matter of documentation. Renaming "git > diff --cached" to "git diff --staged" would cause backward > compatibility problems for example.
Actually, I don't even think of the --cached argument as a flag but as a reference. Consider INDEX and WORKSPACE as references:
git diff INDEX HEAD --name-status -- display staged files (git diff --cached)
git diff INDEX WORKSPACE --name-status -- display unstaged changes (git diff)
git diff HEAD WORKSPACE --name-status -- display changes since last commit (git diff HEAD)
Of course, --cached is not synonymous with INDEX in my example above, thus despite getting use to it, default behavior seems chaotic to me. Git-diff HEAD assumes the unspecified reference is WORKSPACE, while git-diff --cached assumes the unspecified reference is HEAD. Git-diff with no argument assumes the unspecified references as INDEX and WORKSPACE. If I'm mistaken, it might just prove the point. ;-)
Cheers, Alex
-- [ alex@genaud.net ][ http://genaud.net ] [ B068 ED90 F47B 0965 2953 9FC3 EE9C C4D5 3E51 A207 ]