All of lore.kernel.org
 help / color / mirror / Atom feed
* Change in behavior of included safe.directory in system config
@ 2022-10-21  5:19 Yehuda Katz
  2022-10-21  5:52 ` Junio C Hamano
  2022-10-21  5:56 ` Jeff King
  0 siblings, 2 replies; 3+ messages in thread
From: Yehuda Katz @ 2022-10-21  5:19 UTC (permalink / raw)
  To: git

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]#

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Change in behavior of included safe.directory in system config
  2022-10-21  5:19 Change in behavior of included safe.directory in system config Yehuda Katz
@ 2022-10-21  5:52 ` Junio C Hamano
  2022-10-21  5:56 ` Jeff King
  1 sibling, 0 replies; 3+ messages in thread
From: Junio C Hamano @ 2022-10-21  5:52 UTC (permalink / raw)
  To: Yehuda Katz; +Cc: git, Glen Choo

Yehuda Katz <yehuda@ymkatz.net> writes:

> 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

Is this

  https://lore.kernel.org/git/pull.1360.v2.git.git.1665683027912.gitgitgadget@gmail.com/

perhaps?  Can you try the version of Git from my 'next' branch?

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Change in behavior of included safe.directory in system config
  2022-10-21  5:19 Change in behavior of included safe.directory in system config Yehuda Katz
  2022-10-21  5:52 ` Junio C Hamano
@ 2022-10-21  5:56 ` Jeff King
  1 sibling, 0 replies; 3+ messages in thread
From: Jeff King @ 2022-10-21  5:56 UTC (permalink / raw)
  To: Yehuda Katz; +Cc: git

On Fri, Oct 21, 2022 at 01:19:12AM -0400, Yehuda Katz wrote:

> 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.

It's a bug; see:

  https://lore.kernel.org/git/pull.1360.git.git.1665603814.gitgitgadget@gmail.com/

I expect the fix there will be in 2.38.2 (it didn't get into v2.38.1,
which was a pre-planned security release).

-Peff

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-10-21  5:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-21  5:19 Change in behavior of included safe.directory in system config Yehuda Katz
2022-10-21  5:52 ` Junio C Hamano
2022-10-21  5:56 ` Jeff King

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.