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

Re: [PATCH] Add support for GIT_ONE_FILESYSTEM

From
Jeff King <peff@peff.net>
Date
Mar 16, 2010, 02:33 UTC
Message-ID
<20100316023306.GA14253@coredump.intra.peff.net>
In-Reply-To
<20100315214003.GB11157@pixar.com>
On Mon, Mar 15, 2010 at 02:40:03PM -0700, Lars Damerow wrote:
> +		if (getenv("GIT_ONE_FILESYSTEM") != NULL) {

Should this really trigger for GIT_ONE_FILESYSTEM=0? We already have git_env_bool, which will handle 0/1, true/false, etc. Probably you should use it here.

I am not a big fan of the environment variable name, either, but I don't have another good suggestion. It is closely related to GIT_CEILING_DIRECTORIES (in fact, you could probably solve the same problem with GIT_CEILING_DIRECTORIES, but I think your solution is much nicer in that it lets the user get away with being less verbose).

Show 5 quoted lines
> +			if (stat("..", &buf))
> +				die_errno("failed to stat '..'");
> +			if (buf.st_dev != current_device)
> +				die("refusing to cross filesystem boundary '%s/..'", cwd);
> +		}

I agree with Sverre that this message isn't descriptive enough, but I like the suggestion you posted elsewhere in the thread.

-Peff
Previous: Lars DamerowNext: Lars Damerow
Message 4 of 8 in “Add support for GIT_ONE_FILESYSTEM”
  1. Add support for GIT_ONE_FILESYSTEMLars Damerow, Mar 15, 2010
  2. Sverre RabbelierMar 15, 2010
  3. Lars DamerowMar 15, 2010
  4. Jeff KingMar 16, 2010
  5. Lars DamerowMar 16, 2010
  6. Jeff KingMar 16, 2010
  7. Junio C HamanoMar 16, 2010
  8. Lars DamerowMar 16, 2010

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.