Closed nikromen closed 1 month ago
@praiskup OK this was reason why we moved repo root as safe directory - https://github.com/fedora-copr/copr/issues/2597#issuecomment-1487901896 so I don't think we should revert this change. We probably want the /*
feature
I still don't get why :sweat_smile: I experimented with permissions like:
# I'm "praiskup"
$ cd /tmp
$ git clone ~/rh/projects/copr/copr
$ cd /tmp/copr
# sudo su
# chown postgres:postgres cli
# git status
On branch main
Your branch is up to date with 'origin/main'.
nothing to commit, working tree clean
# chown postgres:postgres /tmp/copr
# git status
fatal: detected dubious ownership in repository at '/tmp/copr'
To add an exception for this directory, call:
git config --global --add safe.directory /tmp/cop
IOW, there's no issue with the git tree sub-directory. Only if the top-level
directory is mis-owned. But I agree we don't want to revert the change;
the problem there clearly fixes the problem if subdirectory is used as
cwd
.
We talked about this PR on f2f meeting, and while the <dir>
to <dir>/*
change is not necessarily needed now (a different fix was needed), some users in the future might consider it useful (they might be doing manual git clone in sub-dirs, and there's no need to bother them with tweaking the safe.directory configuration).
Jirka promised to update the commit message.
right, I forgot about that, sorry
done
Relates #3421