git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Stefan Beller <sbeller@google.com>
Cc: "Fredrik Gustafsson" <iveqy@iveqy.com>,
	"Peter Hüfner" <p.huefner@e-confirm.de>,
	"git@vger.kernel.org" <git@vger.kernel.org>
Subject: Re: git on vagrant shared folder
Date: Thu, 16 Jul 2015 09:41:28 -0700	[thread overview]
Message-ID: <xmqq7fq05a2v.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <CAGZ79kbBKzbjbg5u7A7BgnV1JF=5A+-gb0OdYs11g6kx_UQu_A@mail.gmail.com> (Stefan Beller's message of "Tue, 14 Jul 2015 11:53:52 -0700")

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.

  parent reply	other threads:[~2015-07-16 16:41 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-14 15:49 git on vagrant shared folder Peter Hüfner
2015-07-14 18:32 ` Fredrik Gustafsson
2015-07-14 18:53   ` Stefan Beller
2015-07-16  7:09     ` Peter Hüfner
2015-07-16 16:41     ` Junio C Hamano [this message]
2015-07-20  7:26       ` Peter Hüfner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqq7fq05a2v.fsf@gitster.dls.corp.google.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=iveqy@iveqy.com \
    --cc=p.huefner@e-confirm.de \
    --cc=sbeller@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).