git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Importing from tarballs; add, rm, update-index?

From
PBPeter Baumann <peter.b.baumann@stud.informatik.uni-erlangen.de>
Date
Jan 12, 2007, 19:11 UTC
Message-ID
<slrneqfnb8.a6s.Peter.B.Baumann@xp.machine.xx>
In-Reply-To
<7virfct737.fsf@assigned-by-dhcp.cox.net>
On 2007-01-12, Junio C Hamano <junkio@cox.net> wrote:
Show 29 quoted lines
> "Chris Riddoch" <riddochc@gmail.com> writes:
>
>> I suggest calling it something like update-index.  ;)
>
> Exactly.
>
> People new to git need to learn that the next commit is prepared
> not in the working tree but in a separate entity (staging area),
> and there are ways to update what it consists of.  If that
> concept is new for people coming from other SCM, renaming
> "index" to "staging area" only reduces potential confusion
> (because "index" is too generic word that can mean anything) --
> it does not remove the need to learn the new concept.
>
> And we have called that staging area "the index", and the act of
> updating what it consists of has been called "updating the
> index" for a long time.  The primary command to do so has been
> "git-update-index" plumbing, but we added some sugarcoating and
> now "git-add" and "git-rm" (also "git-merge", "git-am" and
> friends "updates the index" for automatable cases) are two most
> visible ways for the users.
>
> The logical name for the operation, if we _were_ to have only
> one command for "updating the index", is "git-update" or
> "git-update-index".  I do not have anything against "git stage"
> but I simply do not see the point, other than "git update" would
> imply something entirely different to people coming from other
> SCM so we would want to avoid the word, and "git update-index"
> is too long to type every day.

I already proposed it but I like "git refresh". It describes precisely whats happening - the previous content of the file known to git is refreshed. AFAIK "update" isn't such a good choice because people from other VCS would expect something else(think e.g. of cvs update).

Show 11 quoted lines
>
> In any case, there are valid reasons that update-index has --add
> and --remove options to force callers to specifically say "Yes I
> know I am talking about unusual things, please".  If we _were_
> to do a single command (be it "git-update" or "git-stage"), it
> needs the same --add/--remove safety, which makes "it's too long
> to type every day -- let's have a single Porcelain-ish" argument
> somewhat moot.  We can have "git-add" and "git-rm" instead.
>
> And indeed we do.  That's where we currently stand.
>

Me doesn't really like the new semantics of "git-add", because it does two seperate things - it adds new files and it refreshes the content of previously known files. These two are, at least for me, two seperate operations. And reading "git add" only suggests to me the first - adding new files.

-Peter
Previous: Junio C HamanoNext: Junio C Hamano
Message 4 of 38 in “Importing from tarballs; add, rm, update-index?”
  1. Chris RiddochJan 12, 2007
  2. Morten WelinderJan 12, 2007
  3. Junio C HamanoJan 12, 2007
  4. Peter BaumannJan 12, 2007
  5. Junio C HamanoJan 12, 2007
  6. Peter BaumannJan 12, 2007
  7. Junio C HamanoJan 13, 2007
  8. Peter BaumannJan 13, 2007
  9. Johannes SchindelinJan 13, 2007
  10. Peter BaumannJan 13, 2007
  11. Julian PhillipsJan 13, 2007
  12. Junio C HamanoJan 13, 2007
  13. Carl WorthJan 13, 2007
  14. Brian GernhardtJan 13, 2007
  15. Peter BaumannJan 13, 2007
  16. Nicolas PitreJan 13, 2007
  17. Carl WorthJan 13, 2007
  18. Junio C HamanoJan 13, 2007
  19. Nicolas PitreJan 13, 2007
  20. Brian GernhardtJan 13, 2007
  21. Peter BaumannJan 13, 2007
  22. Brian GernhardtJan 13, 2007
  23. Alan ChandlerJan 13, 2007
  24. Brian GernhardtJan 13, 2007
  25. Shawn O. PearceJan 13, 2007
  26. Johannes SchindelinJan 14, 2007
  27. Shawn O. PearceJan 14, 2007
  28. Junio C HamanoJan 15, 2007
  29. Shawn O. PearceJan 15, 2007
  30. Daniel BarkalowJan 15, 2007
  31. Horst H. von BrandJan 16, 2007
  32. Daniel BarkalowJan 16, 2007
  33. Christian MICHONJan 16, 2007
  34. Jakub NarebskiJan 16, 2007
  35. Carl WorthJan 12, 2007
  36. Johannes SchindelinJan 12, 2007
  37. Junio C HamanoJan 13, 2007
  38. Jakub NarebskiJan 12, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.