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

Re: 'setup_work_tree()' considered harmful

From
Linus Torvalds <torvalds@linux-foundation.org>
Date
Jun 18, 2008, 16:26 UTC
Message-ID
<alpine.LFD.1.10.0806180924170.2907@woody.linux-foundation.org>
In-Reply-To
<20080618090527.GA24254@glandium.org>
On Wed, 18 Jun 2008, Mike Hommey wrote:
> 
> Maybe using openat, fstatat, etc. when they are available, could be a
> good thing, already, though it wouldn't help for other platforms.

I agree that openat() and friends would be nice for this (use a file descriptor instead of a string to point to object directories etc), but it's unportable enough that the pain of having to have two totally different access routines is just not worth it. It could be done, but it would need some really nifty abstraction layer.

We do already have _part_ of that abstraction layer with things like "git_path()" etc, but it would have to be extended upon quite a bit.

		Linus
Previous: Mike Hommey
Message 5 of 5 in “'setup_work_tree()' considered harmful”
  1. Linus TorvaldsJun 17, 2008
  2. Linus TorvaldsJun 17, 2008
  3. Johannes SchindelinJun 17, 2008
  4. Mike HommeyJun 18, 2008
  5. Linus TorvaldsJun 18, 2008

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.