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

Re: [RFC] separate .git from working directory

From
SCSergio Callegari <scallegari@arces.unibo.it>
Date
Oct 12, 2006, 12:15 UTC
Message-ID
<200610121415.03086.scallegari@arces.unibo.it>
Possibly a bit different from the RFC, however,

Other than making find happy, I see other potential advantages in supporting the two options of having .git be either

- a directory containing all the git stuff
- a single file with a pointer to the real directory containing the objects, 
references, branches, etc.
1) It might make the life easier on platforms where symlinks are not the 
easiest thing to do (are there any?)
2) it might make it easier to work with syncronization tools (some of you 
might know that I got burnt with them recently). One of the issues of 
syncronizatoin tools is that they typically recognize renames as the 
non-atomical sequence of creation+deletion. Hence imagine the following 
scenario. I have ProjectFoo with the .git dir in. I tell the syncronization 
tool to ignore things called .git (not to get burned again!). I decide to 
rename ProjectFoo into ProjectBar. When I sync, I get with a ProjectBar with 
no .git directory since .git was meant to be ignored and is consequently lost 
in the creation+deletion sequence. All objects are then lost at one of the 
two hosts participating in the syncronization. If .git was only a file with a 
pointer, it would at least be possible to recreate it by hand without 
depending on the other syncronization host.
3) it might make it possible to have all the git archives in a single place, 
where it is easy to program a script to scan all the archives and repack all 
of them periodically or to scan all of them and backup them periodically, 
etc.
Sergio
Next: Alex Riesen
Message 1 of 2 in “Re: [RFC] separate .git from working directory”
  1. Sergio CallegariOct 12, 2006
  2. Alex RiesenOct 12, 2006

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.