]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Merge branch 'js/safe-directory-plus'
authorJunio C Hamano <gitster@pobox.com>
Mon, 15 Aug 2022 06:19:28 +0000 (23:19 -0700)
committerJunio C Hamano <gitster@pobox.com>
Mon, 15 Aug 2022 06:19:28 +0000 (23:19 -0700)
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

1  2 
compat/mingw.c
setup.c

diff --cc compat/mingw.c
Simple merge
diff --cc setup.c
index 8c683e92b62e76cfbc350c8d8f4e9372f62c5f8f,ddcf6eb6035cd42709a46f84a71460a097ff9d9b..cefd5f63c4680f7f656084ef72f74784f86e4562
+++ b/setup.c
@@@ -1342,9 -1300,7 +1345,9 @@@ static enum discovery_result setup_git_
                }
  
                if (is_git_directory(dir->buf)) {
-                       if (!ensure_valid_ownership(NULL, NULL, dir->buf))
 +                      if (get_allowed_bare_repo() == ALLOWED_BARE_REPO_EXPLICIT)
 +                              return GIT_DIR_DISALLOWED_BARE;
+                       if (!ensure_valid_ownership(NULL, NULL, dir->buf, report))
                                return GIT_DIR_INVALID_OWNERSHIP;
                        strbuf_addstr(gitdir, ".");
                        return GIT_DIR_BARE;