From: Yehuda Katz <yehuda@ymkatz.net>
To: git@vger.kernel.org
Subject: Change in behavior of included safe.directory in system config
Date: Fri, 21 Oct 2022 01:19:12 -0400 [thread overview]
Message-ID: <CAGBAQ45f6D=XsyiOmumpAnE+OxQpuZXhMsVegrHKsxaN5mc3eQ@mail.gmail.com> (raw)
There seems to be some change in behavior, either to included files or
to safe.directory between Git 2.36.0 and 2.38.0. I don't see any
explanation in the release notes.
I push out a system configuration with a configuration management tool
which is why it is in a separate file.
If I put the safe.directory configuration in the main system config,
it works. I don't understand why this is because the value is still
shown when running a config list.
Basic config:
[root@myhost myproject]# pwd
/opt/myproject
[root@myhost myproject]# cat /etc/gitconfig
[include]
path = /etc/gitconfig.d/myproject
[root@myhost myproject]# cat /etc/gitconfig.d/myproject
[safe]
directory = /opt/myproject
With the old version:
[root@myhost myproject]# git --version
git version 2.36.0
[root@myhost myproject]# git config --list --show-scope
system include.path=/etc/gitconfig.d/myproject
system safe.directory=/opt/myproject
local core.repositoryformatversion=0
local core.filemode=true
local core.bare=false
local core.logallrefupdates=true
local remote.origin.url=git@gitlab.example.com:me/myproject.git
local remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
local branch.master.remote=origin
local branch.master.merge=refs/heads/master
[root@myhost myproject]# git pull
Already up to date.
[root@myhost myproject]#
After the upgrade:
[root@myhost myproject]# git --version
git version 2.38.0
[root@myhost myproject]# git config --list --show-scope
system include.path=/etc/gitconfig.d/puppet
system safe.directory=/opt/myproject
[root@myhost myproject]# git pull
fatal: detected dubious ownership in repository at '/opt/myproject'
To add an exception for this directory, call:
git config --global --add safe.directory /opt/myproject
[root@myhost myproject]#
next reply other threads:[~2022-10-21 5:19 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-21 5:19 Yehuda Katz [this message]
2022-10-21 5:52 ` Change in behavior of included safe.directory in system config Junio C Hamano
2022-10-21 5:56 ` Jeff King
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAGBAQ45f6D=XsyiOmumpAnE+OxQpuZXhMsVegrHKsxaN5mc3eQ@mail.gmail.com' \
--to=yehuda@ymkatz.net \
--cc=git@vger.kernel.org \
/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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.