From: Junio C Hamano Date: Mon, 15 Aug 2022 06:19:28 +0000 (-0700) Subject: Merge branch 'js/safe-directory-plus' X-Git-Tag: v2.38.0-rc0~76 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7fac7b563b0d4f174b30bfbedab67e59af8cce84;p=thirdparty%2Fgit.git Merge branch 'js/safe-directory-plus' Platform-specific code that determines if a directory is OK to use as a repository has been taught to report more details, especially on Windows. * js/safe-directory-plus: mingw: handle a file owned by the Administrators group correctly mingw: be more informative when ownership check fails on FAT32 mingw: provide details about unsafe directories' ownership setup: prepare for more detailed "dubious ownership" messages setup: fix some formatting --- 7fac7b563b0d4f174b30bfbedab67e59af8cce84 diff --cc setup.c index 8c683e92b6,ddcf6eb603..cefd5f63c4 --- a/setup.c +++ b/setup.c @@@ -1342,9 -1300,7 +1345,9 @@@ static enum discovery_result setup_git_ } if (is_git_directory(dir->buf)) { + if (get_allowed_bare_repo() == ALLOWED_BARE_REPO_EXPLICIT) + return GIT_DIR_DISALLOWED_BARE; - if (!ensure_valid_ownership(NULL, NULL, dir->buf)) + if (!ensure_valid_ownership(NULL, NULL, dir->buf, report)) return GIT_DIR_INVALID_OWNERSHIP; strbuf_addstr(gitdir, "."); return GIT_DIR_BARE;