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

Re: separate-git-dir doesn't work with mapped drive

From
Fredrik Gustafsson <iveqy@iveqy.com>
Date
Oct 19, 2013, 11:11 UTC
Message-ID
<20131019111137.GT13967@paksenarrion.iveqy.com>
In-Reply-To
<CADgy815BJAJrbW0JJ2a9vZ4NwzGersceg6b96TPAey_pR+mOiw@mail.gmail.com>
On Sat, Oct 19, 2013 at 11:49:27AM +0300, Ain Valtin wrote:
Show 43 quoted lines
> Hi
> 
> I want to use git in a VirtualBox guest so that the repository is on
> the host drive. So in the VB settings for the guest I set up a shared
> folder "gitRepos" to /home/ain with full access rights. Then in the
> guest OS (Windows XP) I map this shared folder as G drive. Now in the
> project dir I execute
> 
> C:\...\TPP>git init --separate-git-dir g:/TPP
> Initialized empty Git repository in g:/TPP/
> 
> Checked, the repo structure is in the "g:/TPP/" (thus the guest OS can
> write to the mapped dir) and in the .git file created to the project
> dir there is line
> 
> gitdir: g:/TPP
> 
> However when tring to use the repo it fails to recognise the g:/TPP path, ie
> 
> C:\...\TPP>git add .
> fatal: unable to access '../../../../../../g:/TPP/config': Invalid argument
> 
> Also tryed "gitdir: //VBOXSVR/gitRepos/TPP" but this fails too:
> 
> C:\...\TPP>git add .
> fatal: Unable to create 'C:/Documents and
> Settings/Ain/prog/AVT/TPP/../../../../../..///VBOXSVR/gitRepos/TPP/index.lock':
> No such file or directory
> 
> Am I doing something wrong or is it a bug? Any idea how to get it to work?
> 
> BTW the VB is 3.0.14 ie rather old version but it seems that this
> isn't the problem as the git init recognises the mapped drive but
> other commands fail.
> git version is 1.8.4.msysgit.0
> 
> 
> TIA
> ain
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

Git has a bad history with mapped drives in windows. It's also usually a bad idea to use git over the network (and most mapped drives are over the network and not local between virt. machines).

I would advise not to use this setup since for the past two years that git has sometime worked and sometimes not with this setup. (It's not just seperate git dir, a git dir at all over a smb share have been problematic).

(This is probably something we should have in a test-suite somewhere.)
-- 
Med vänliga hälsningar
Fredrik Gustafsson

tel: 0733-608274
e-post: iveqy@iveqy.com
Previous: Duy NguyenNext: Ain Valtin
Message 3 of 7 in “separate-git-dir doesn't work with mapped drive”
  1. Ain ValtinOct 19, 2013
  2. Duy NguyenOct 19, 2013
  3. Fredrik GustafssonOct 19, 2013
  4. Ain ValtinOct 19, 2013
  5. Fredrik GustafssonOct 19, 2013
  6. Torsten BögershausenOct 19, 2013
  7. Ain ValtinOct 19, 2013

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.