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

Re: clarification on git-update-index --remove

From
Junio C Hamano <junkio@cox.net>
Date
Jan 4, 2007, 20:27 UTC
Message-ID
<7vwt42k05c.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<e1dab3980701041129l3944df8ep985141d8f436d0a7@mail.gmail.com>
"David Tweed" <david.tweed@gmail.com> writes:
> --remove::
> 	If a specified file is in the index but is missing then it's
> 	removed.
> 	Default behavior is to ignore removed file.

If necessary, better rewording to remove confusion is very much appreciated.

"update-index <path>..." without options (that is "Default behaviour") updates the index using the contents of the named <path> found on the filesystem. It does _not_ add new paths to the index, nor remove paths (that exists in the index) from the index.

Giving --add allows new paths to be added to the index if named paths are found on the filesystem. Giving --remove allows existing paths to be removed from the index if named paths are not found on the filesystem.

Previous: David Tweed
Message 2 of 2 in “clarification on git-update-index --remove”
  1. David TweedJan 4, 2007
  2. Junio C HamanoJan 4, 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.