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

Re: git, isolation

From
Dennis Kaarsemaker <dennis@kaarsemaker.net>
Date
Nov 3, 2017, 16:52 UTC
Message-ID
<1509727946.1734.2.camel@kaarsemaker.net>
In-Reply-To
<9f514a9b-858c-9f3a-e2d4-a45987a19b9a@prolan-power.hu>
On Fri, 2017-11-03 at 17:33 +0100, Péter wrote:
> Hi,
> 
> If I do a "git commit", issue git operations, and at the end, issue a "rm <the_git_dir>", is there any guarantee that my 
> filesystem will be "clean", 
No.
> i.e. not polluted or otherwise modified by some git command? Are the git operations 
> restricted to the repo-directory (and possibly remote places, over network)? 
No.
> Do the git-directory behaves as it were 
> chroot-ed or be a sandbox? (Yet another words: is the git-directory isolated from the rest of the local filesystem (and 
> packaging system)?)
And no :)

Most git commands will not touch anything outside the main worktree and the .git directory in there, but commands like 'git worktree' can be used to create worktrees anywhere in the filesystem, and when you play tricks with the GIT_WORK_TREE environment variable, you can do other nasty things.

D.
Previous: PéterNext: Stefan Beller
Message 2 of 3 in “git, isolation”
  1. PéterNov 3, 2017
  2. Dennis KaarsemakerNov 3, 2017
  3. Stefan BellerNov 3, 2017

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.