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

Re: git on vagrant shared folder

From
PHPeter Hüfner <p.huefner@e-confirm.de>
Date
Jul 20, 2015, 07:26 UTC
Message-ID
<CD7F4720-BC1F-4382-9EF7-00E7F3A5C60C@e-confirm.de>
In-Reply-To
<xmqq7fq05a2v.fsf@gitster.dls.corp.google.com>

Junio is absolutely right. I wasn’t trying to commit that file directly. The error comes up when I want to change the config via git config or when I clone the repo. I also know that a shared folder is not a very friendly environment, but it is the best solution for our situation here. We recognized the error first time in the beginning of july, so the change done in june 30 seems to be a reason. I will stay up to date and try it with newer git versions.

Mit freundlichen Grüßen
 
Peter Hüfner
.........................................................
e·confirm GmbH ..
Travel.Software.Training.Consulting
 
Geschäftsführer: Roman Borch und Michael Posthoff
HRB 35653B   Steuernummer 37/211/10880
10119 Berlin Linienstr. 214
 
Tel.  +49 (0) 30 28 00 28 24 
Fax. +49 (0) 30 28 00 28 28
 
www.e-confirm.de
.................................................................................................
Show 34 quoted lines
> Am 16.07.2015 um 18:41 schrieb Junio C Hamano <gitster@pobox.com>:
> 
> Stefan Beller <sbeller@google.com> writes:
> 
>>>> A few weeks ago we weren’t able to clone and get an error: could
>>> not commit /vagrant/.git/config file. Manually we were able to
>>> change that file and also the clone command works outside the shared
>>> folder.
>>> 
>>> Why are you trying to commit a file inside the .git dir? Files in that
>>> dir should not be commited (and I'm pretty sure there was a patch about
>>> this a while ago). The .git/config file for example is local to each git
>>> repo and should not be commited.
>> 
>> Actually it is considered a security risk, see
>> http://article.gmane.org/gmane.linux.kernel/1853266
> 
> I do not think Peter meant to "git add .git/config && git commit" by
> referring to the 'could not commit config file' error message he
> saw; you two are going in a wrong direction.
> 
>    $ git grep 'could not commit'
>    config.c: error("could not commit config file %s", config_filename);
> 
> I do share Fredrik's suspicion that the virtual filesystem the
> Ubuntu guest is trying to write to is at fault, but I never used
> "vagrant shared", and I do not know in what specific way their
> filesystem is not behaving as we expect.
> 
> Applying 7a64592c (config.c: fix writing config files on Windows
> network shares, 2015-06-30) might be an interesting thing to try.
> Some filesystems do not want to rename a file that has mmaped region
> still active, which is my blind guess.
> 
Previous: Junio C Hamano
Message 6 of 6 in “git on vagrant shared folder”
  1. Peter HüfnerJul 14, 2015
  2. Fredrik GustafssonJul 14, 2015
  3. Stefan BellerJul 14, 2015
  4. Peter HüfnerJul 16, 2015
  5. Junio C HamanoJul 16, 2015
  6. Peter HüfnerJul 20, 2015

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.