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

Re: '.git file' alternative, native (cross-platform) workdir support.

From
Marius Storm-Olsen <marius@trolltech.com>
Date
Feb 29, 2008, 14:51 UTC
Message-ID
<47C81C08.2060608@trolltech.com>
In-Reply-To
<alpine.LSU.1.00.0802291333310.22527@racer.site>
Johannes Schindelin said the following on 29.02.2008 15:25:
Show 11 quoted lines
> On Fri, 29 Feb 2008, Marius Storm-Olsen wrote:
>> I'm actually not sure that it's impossible to make it safe. My 
>> implementation works by redirecting files into the real repo.
>> However, we can also detect when redirection is in effect, and do
>> extra 'maintainance' things then, to avoid the bad effects.
> 
> From the perspective of Windows, I guess it is easy to overlook the
> fact that permissions can break your idea.
> 
> Even after creating a second working tree for an existing
> repository, the permissions of the original repository can change.

Sure, but that would break _any_ working tree implementation. Without access to the original data, it whole thing is bust, no matter if you redirect all or part of .git/.

Checking if we have access to the redirected .git is trivial in both cases. (partial or whole redirection)

Show 6 quoted lines
> The only way to be on the safe side is to use _the repository_
> twice.  IOW not having a second .git/ directory.
> 
> Also, having a single .git is just a very simple, and thus
> preferable concept, to having part of this, and part of that
> repository.

I whole heartedly agree. I'm not proposing to keep it split in the long run. I'm just proposing something that 'works' *now*, and can be improved incrementally; as opposed to, doesn't work now, and needs to be fully implemented before it works for the Windows crowd.

PS. The redirection method I propose already alleviates an issue of the current git-new-workdir has, which Shawn has experienced many atime: The deletion of .git/config and .git/packed-refs, making 'git-config' and 'git tag -d' unsafe in a workdir. (Though I'm unsure if that has been fixed already. In any case, since the files are really redirected, there no chance that deleting a file will remove a synlink, only to be recreated as a normal file instead)

-- 
.marius
Previous: Johannes SchindelinNext: Junio C Hamano
Message 6 of 8 in “'.git file' alternative, native (cross-platform) workdir support.”
  1. Marius Storm-OlsenFeb 29, 2008
  2. Johannes SchindelinFeb 29, 2008
  3. Marius Storm-OlsenFeb 29, 2008
  4. Jakub NarebskiFeb 29, 2008
  5. Johannes SchindelinFeb 29, 2008
  6. Marius Storm-OlsenFeb 29, 2008
  7. Junio C HamanoFeb 29, 2008
  8. Marius Storm-OlsenFeb 29, 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.