c1ef4a7481
path to a bare repo when git config is not allowed to list the configs due to the CVE-2022-24765 fix. That resulted in a confusing error message, and prevented the nice message that explains how to mark the repo as safe to use. Made isBare a tristate so that the case where core.bare is not returned can be handled. The handling in updateLocation is to check if the directory contains config and objects and if so assume it's bare. Note that if that heuristic is somehow wrong, it would construct a repo that thinks it's bare but is not. That could cause follow-on problems, but since git-annex then checks checkRepoConfigInaccessible, and skips using the repo anyway, a wrong guess should not be a problem. Sponsored-by: Luke Shumaker on Patreon
15 lines
375 B
Markdown
15 lines
375 B
Markdown
git init foo.git
|
|
cd foo.git
|
|
git-annex init
|
|
cd ..
|
|
git clone foo.git bar
|
|
sudo chown root.root foo.git
|
|
cd bar
|
|
git-annex init
|
|
init fatal: not a git repository: /tmp/foo.git/.git'
|
|
|
|
This is specific to bare git remotes, for non-bare it
|
|
detects and warns that safe.directory is needed to use the
|
|
remote. --[[Joey]]
|
|
|
|
> [[fixed|done]] --[[Joey]]
|