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

Re: [RFC/PATCH] Use work tree to determine if it supports symlinks

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 27, 2012, 21:55 UTC
Message-ID
<7vobn0zx5m.fsf@alter.siamese.dyndns.org>
In-Reply-To
<17699041.7b2cBoDgE0@mephista>
Sascha Cunz <Sascha-ML@babbelbox.org> writes:
Show 11 quoted lines
> From 3f449e719b924929f1f8ca9b5eff83f17bc64c60 Mon Sep 17 00:00:00 2001
> From: Sascha Cunz <Sascha@BabbelBox.org>
> Date: Fri, 27 Jul 2012 22:54:56 +0200
> Subject: [PATCH] Use work tree to determine if it supports symlinks
>
> When creating a new repository, we check some capabilities of the
> underlying file system(s). We check the file system for its case
> sensitivity and the ability to create symbolic links.
>
> Before this patch the .git-dir was used for this check, while the
> comments in code clearly state to test on the work tree.

That is simply because a layout that has .git and its containing directory (i.e. the working tree) on a separate filesystem when we run "git init" is not supported, and more importantly, we do not want to step outside ".git", which is the simplest and safest way to avoid touching the end-user data that sits in the working tree.

The code comment is about checking the filesystem that houses both the working tree and ".git"; if the user later wants to turn .git into a separate mount point, or if the user wants to use GIT_DIR and GIT_WORK_TREE to create a funny layout, the user should know how to muck with ".git/config" to adjust to the peculiarity.

Previous: Sascha CunzNext: Sascha Cunz
Message 2 of 5 in “Use work tree to determine if it supports symlinks”
  1. Use work tree to determine if it supports symlinksSascha Cunz, Jul 27, 2012
  2. Junio C HamanoJul 27, 2012
  3. Sascha CunzJul 27, 2012
  4. Junio C HamanoJul 27, 2012
  5. Sascha CunzJul 27, 2012

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.