Re: Call Me Gitless

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>> 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@xxxxxxxxxx ][ http://genaud.net ]
[ B068 ED90 F47B 0965 2953 9FC3 EE9C C4D5 3E51 A207 ]
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux