git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* Why git shows staging area to users?
@ 2012-10-13 21:08 Yi, EungJun
  2012-10-14  0:06 ` Felipe Contreras
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Yi, EungJun @ 2012-10-13 21:08 UTC (permalink / raw)
  To: git

Hi, all.

Why git shows staging area to users, compared with the other scms hide
it? What benefits users get?

I feel staging area is useful, but it is difficult to explain why when
someone asks me about that.

Thanks.

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

* Re: Why git shows staging area to users?
  2012-10-13 21:08 Why git shows staging area to users? Yi, EungJun
@ 2012-10-14  0:06 ` Felipe Contreras
  2012-10-14  0:56 ` David Aguilar
  2012-10-14  2:09 ` Sitaram Chamarty
  2 siblings, 0 replies; 6+ messages in thread
From: Felipe Contreras @ 2012-10-14  0:06 UTC (permalink / raw)
  To: semtlenori; +Cc: git

On Sat, Oct 13, 2012 at 11:08 PM, Yi, EungJun <semtlenori@gmail.com> wrote:
> I feel staging area is useful, but it is difficult to explain why when
> someone asks me about that.

I agree. There has been a lot of discussions about how to improve the
UI to make it more user-friendly. Maybe sometime.

-- 
Felipe Contreras

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

* Re: Why git shows staging area to users?
  2012-10-13 21:08 Why git shows staging area to users? Yi, EungJun
  2012-10-14  0:06 ` Felipe Contreras
@ 2012-10-14  0:56 ` David Aguilar
  2012-10-14  4:38   ` Junio C Hamano
  2012-10-14 17:16   ` Matthieu Moy
  2012-10-14  2:09 ` Sitaram Chamarty
  2 siblings, 2 replies; 6+ messages in thread
From: David Aguilar @ 2012-10-14  0:56 UTC (permalink / raw)
  To: semtlenori; +Cc: git

On Sat, Oct 13, 2012 at 2:08 PM, Yi, EungJun <semtlenori@gmail.com> 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.

> I feel staging area is useful, but it is difficult to explain why when
> someone asks me about that.

See above.
-- 
David

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

* Re: Why git shows staging area to users?
  2012-10-13 21:08 Why git shows staging area to users? Yi, EungJun
  2012-10-14  0:06 ` Felipe Contreras
  2012-10-14  0:56 ` David Aguilar
@ 2012-10-14  2:09 ` Sitaram Chamarty
  2 siblings, 0 replies; 6+ messages in thread
From: Sitaram Chamarty @ 2012-10-14  2:09 UTC (permalink / raw)
  To: semtlenori; +Cc: git

On Sun, Oct 14, 2012 at 2:38 AM, Yi, EungJun <semtlenori@gmail.com> wrote:
> Hi, all.
>
> Why git shows staging area to users, compared with the other scms hide
> it? What benefits users get?
>
> I feel staging area is useful, but it is difficult to explain why when
> someone asks me about that.

I wrote this a long time ago, more for my understanding than
otherwise, but maybe it is useful:
http://sitaramc.github.com/concepts/uses-of-index.html

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

* Re: Why git shows staging area to users?
  2012-10-14  0:56 ` David Aguilar
@ 2012-10-14  4:38   ` Junio C Hamano
  2012-10-14 17:16   ` Matthieu Moy
  1 sibling, 0 replies; 6+ messages in thread
From: Junio C Hamano @ 2012-10-14  4:38 UTC (permalink / raw)
  To: David Aguilar; +Cc: semtlenori, git

David Aguilar <davvid@gmail.com> writes:

> On Sat, Oct 13, 2012 at 2:08 PM, Yi, EungJun <semtlenori@gmail.com> 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.
>
>> I feel staging area is useful, but it is difficult to explain why when
>> someone asks me about that.
>
> See above.

Very well said.  Thanks.

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

* Re: Why git shows staging area to users?
  2012-10-14  0:56 ` David Aguilar
  2012-10-14  4:38   ` Junio C Hamano
@ 2012-10-14 17:16   ` Matthieu Moy
  1 sibling, 0 replies; 6+ messages in thread
From: Matthieu Moy @ 2012-10-14 17:16 UTC (permalink / raw)
  To: David Aguilar; +Cc: semtlenori, git

David Aguilar <davvid@gmail.com> writes:

> On Sat, Oct 13, 2012 at 2:08 PM, Yi, EungJun <semtlenori@gmail.com> 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/

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

end of thread, other threads:[~2012-10-14 17:17 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-13 21:08 Why git shows staging area to users? Yi, EungJun
2012-10-14  0:06 ` Felipe Contreras
2012-10-14  0:56 ` David Aguilar
2012-10-14  4:38   ` Junio C Hamano
2012-10-14 17:16   ` Matthieu Moy
2012-10-14  2:09 ` Sitaram Chamarty

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).