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

Re: [PATCH] git-status: wording update to deal with deleted files.

From
Junio C Hamano <junkio@cox.net>
Date
Jan 12, 2007, 00:13 UTC
Message-ID
<7v1wm114rx.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<87ac0pxgl2.wl%cworth@cworth.org>
Carl Worth <cworth@cworth.org> writes:
Show 13 quoted lines
> ... So conceptually, the user can be left
> with, "hmm... it's not updated, but how the heck do I update it?".
>
>>  - Suggestion is "git add ... to update what will be committed",
>>    instead of "... to add content to commit";
>>
>>  - If there are removed paths, the above suggestion becomes "git
>>    add/rm ... to update what will be committed";
>
> Here now we do start providing the user with some mechanisms for
> "update". Sometimes we suggest using "add" to update, and sometimes we
> suggest using "add" or "rm" to update. But as you yourself have
> pointed out, you consider "rm" a totally pointless command.
You are twisting my words ;-).

"rm" is pointless for a workflow that always uses "commit -a". In the same sense, the three categorization "git-status" gives is pointless -- "changed but not updated" class does not have any significance if you always do "commit -a".

But that is not the only workflow we encourage.

I do encourage "commit -a" or "commit after update-index" and frown upon but tolerate "commit <paths>..." --- all of the above is in line with this world view. And the categorization and suggestions are about the latter: "commit after update-index".

Then the issue is how to expose update-index to the end users. "add" is about adding the content. What's unfortunate is that adding a file as zero-length content is still different from removing it.

Honestly, removing is so different from the norm that I do not see major inconsistency nor inconvenience, practically nor in philosophy, to have two separate Porcelain-ish commands, add and rm, to perform content additions and removal.

Previous: Carl WorthNext: Carl Worth
Message 9 of 15 in “Removing files”
  1. David KågedalJan 11, 2007
  2. Alex RiesenJan 11, 2007
  3. Seth FalconJan 11, 2007
  4. Junio C HamanoJan 11, 2007
  5. Eric WongJan 11, 2007
  6. Junio C HamanoJan 11, 2007
  7. git-status: wording update to deal with deleted files.Junio C Hamano, Jan 11, 2007
  8. Carl WorthJan 11, 2007
  9. Junio C HamanoJan 12, 2007
  10. Carl WorthJan 12, 2007
  11. Jakub NarebskiJan 12, 2007
  12. Jeff KingJan 12, 2007
  13. Juergen RuehleJan 12, 2007
  14. Carl WorthJan 11, 2007
  15. Jeff KingJan 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.