From 8077fc9ce7f42cd10a223b1597c2d8bb1dd1bfb9 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 14 Feb 2023 13:31:26 -0400 Subject: [PATCH] analysis --- doc/bugs/bare_remote_safe_directory.mdwn | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/doc/bugs/bare_remote_safe_directory.mdwn b/doc/bugs/bare_remote_safe_directory.mdwn index 5c8622cdf2..e21eca86a6 100644 --- a/doc/bugs/bare_remote_safe_directory.mdwn +++ b/doc/bugs/bare_remote_safe_directory.mdwn @@ -11,3 +11,16 @@ This is specific to bare git remotes, for non-bare it detects and warns that safe.directory is needed to use the remote. --[[Joey]] + +> What's causing this is that Git.Config.read is called +> on the repo, but git refuses to list the repo's config, +> so updateLocation does not see that the repo is bare +> when it checks isBare. And so it proceeds to set gitdir +> to the default non-bare "dir/.git" value. +> +> One way to deal with this would be to make isBare a tristate, +> since core.bare is not in the listed config at all. +> +> Or, make Git.Construct.fromPath detect when a repo is bare +> w/o parsing config, and indicate that in the Repo it +> generates.