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

Re: Do "git add" as a builtin

From
Junio C Hamano <junkio@cox.net>
Date
May 18, 2006, 16:50 UTC
Message-ID
<7vzmhfnupz.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<Pine.LNX.4.64.0605180929450.10823@g5.osdl.org>
Linus Torvalds <torvalds@osdl.org> writes:
> Thinking some more about it, I think I personally much prefer this.
I like this much better than the old (pre-builtin) behaviour.
> Especially as a quick look-through seems to say that there's actually a 
> path through git-update-index too that allows a unverified filename to get 
> into the index (the new "--unresolve" thing also misses the need to verify 
> the path).

Perhaps, but unresolve splits an entry that is available from the heads being merged, so it would use unverified filename to try finding the ents from trees, but get_tree_entry() would not find one, so I think we are safe already. Nevertheless, I think your change makes things more strict and safer.

I doubt this would break people's scripts. If they were relying on the old behaviour, that means they threw real paths and garbage at update-index and relied on it to sift them apart, which indicates they were buggy to begin with anyway.

Previous: Linus TorvaldsNext: Linus Torvalds
Message 11 of 13 in “Do "git add" as a builtin”
  1. Linus TorvaldsMay 17, 2006
  2. Junio C HamanoMay 17, 2006
  3. Linus TorvaldsMay 17, 2006
  4. Junio C HamanoMay 18, 2006
  5. Junio C HamanoMay 18, 2006
  6. [WARNING] Please be careful when using "git add" from "next" branchJunio C Hamano, May 18, 2006
  7. FIXED: [WARNING] Please be careful when using "git add" from "next" branchJunio C Hamano, May 19, 2006
  8. Linus TorvaldsMay 18, 2006
  9. Linus TorvaldsMay 18, 2006
  10. Linus TorvaldsMay 18, 2006
  11. Junio C HamanoMay 18, 2006
  12. Linus TorvaldsMay 18, 2006
  13. Linus TorvaldsMay 18, 2006

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.