Re: Why git shows staging area to users?

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

 



David Aguilar <davvid@xxxxxxxxx> writes:

> On Sat, Oct 13, 2012 at 2:08 PM, Yi, EungJun <semtlenori@xxxxxxxxx> wrote:
>> Hi, all.
>>
>> Why git shows staging area to users, compared with the other scms hide
>> it? What benefits users get?
>
> http://thkoch2001.github.com/whygitisbetter/#the-staging-area
> http://tomayko.com/writings/the-thing-about-git
> http://gitready.com/beginner/2009/01/18/the-staging-area.html
>
> Other scms do not "hide"; other scms lack this feature altogether.

More precisely: there are several things in what git calls "the index"
or "the staging area" (i.e. .git/index):

1) a list of files tracked by Git

2) a record of the last known meta-data of the file, used to avoid
   re-reading unmodified files content each time one runs "diff",
   "commit" or so.

3) a record of the file's staged *content* (possible several records in
   case a merge is going on)

Any decent revision control has the equivalent of 1) and 2), but AFAIK,
3) is a unique feature of Git. There is a frequent confusion between 2)
and 3) that leads to people (often other revision-control
users/developers) wonder why this is visible to the user. 2) is a
performance optimization that can be hidden to the user (it is with
Git's porcelain commands), but 3) is user-visible.

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
--
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]