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

Re: [RFC/PATCH] git add: notice removal of tracked paths by default

From
Junio C Hamano <gitster@pobox.com>
Date
Apr 19, 2011, 21:41 UTC
Message-ID
<7voc41537g.fsf@alter.siamese.dyndns.org>
In-Reply-To
<BANLkTin4iVLzga6gFAh+x8nRTKuVTTFPqA@mail.gmail.com>
Sverre Rabbelier <srabbelier@gmail.com> writes:
> Is there a way to add disable this somehow? I don't think we have a
> '--no-update', do we?

If we need to be able to disable this, then we are probably better off not doing this change. After all, adding -A on the command line is easy.

The change makes sense only if nobody wants to do "only addition and modification".

I have a strong feeling that the current "git add $path" semantics came primarily from historical implementation and pure inertia, and not from a well thought out design. After all, when you are saying "git add ." (or "git add dir/"), you are saying that you want to take what you have in that directory as a whole, except for whatever is excluded with your well-maintained .gitignore file. It felt very unnatural that the command excluded removal without the "-A" option when I tried to be in that mindset.

But as I said, I do not have a strong opinion for this change, other than "if we need this optional, then it is not worth doing this".

Previous: Sverre RabbelierNext: Sverre Rabbelier
Message 3 of 6 in “git add: notice removal of tracked paths by default”
  1. git add: notice removal of tracked paths by defaultJunio C Hamano, Apr 19, 2011
  2. Sverre RabbelierApr 19, 2011
  3. Junio C HamanoApr 19, 2011
  4. Sverre RabbelierApr 19, 2011
  5. Jeff KingApr 20, 2011
  6. Michael J GruberApr 20, 2011

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.