summaryrefslogtreecommitdiff
path: root/compat
diff options
context:
space:
mode:
authorJohannes Schindelin <johannes.schindelin@gmx.de>2022-08-08 13:27:47 (GMT)
committerJunio C Hamano <gitster@pobox.com>2022-08-08 16:25:40 (GMT)
commit17d3883fe9c88b823002ad9fafb42313ddc3d3d5 (patch)
tree25e09eb1ecc069535b76559de03a50406db22fc6 /compat
parentd51e1dff980b9fc87002436b6ab36120a39816b1 (diff)
downloadgit-17d3883fe9c88b823002ad9fafb42313ddc3d3d5.zip
git-17d3883fe9c88b823002ad9fafb42313ddc3d3d5.tar.gz
git-17d3883fe9c88b823002ad9fafb42313ddc3d3d5.tar.bz2
setup: prepare for more detailed "dubious ownership" messages
When verifying the ownership of the Git directory, we sometimes would like to say a bit more about it, e.g. when using a platform-dependent code path (think: Windows has the permission model that is so different from Unix'), but only when it is a appropriate to actually say something. To allow for that, collect that information and hand it back to the caller (whose responsibility it is to show it or not). Note: We do not actually fill in any platform-dependent information yet, this commit just adds the infrastructure to be able to do so. Based-on-an-idea-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'compat')
-rw-r--r--compat/mingw.c2
-rw-r--r--compat/mingw.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/compat/mingw.c b/compat/mingw.c
index 2607de9..f12b7df 100644
--- a/compat/mingw.c
+++ b/compat/mingw.c
@@ -2673,7 +2673,7 @@ static PSID get_current_user_sid(void)
return result;
}
-int is_path_owned_by_current_sid(const char *path)
+int is_path_owned_by_current_sid(const char *path, struct strbuf *report)
{
WCHAR wpath[MAX_PATH];
PSID sid = NULL;
diff --git a/compat/mingw.h b/compat/mingw.h
index a74da68..209cf7c 100644
--- a/compat/mingw.h
+++ b/compat/mingw.h
@@ -463,7 +463,7 @@ char *mingw_query_user_email(void);
* Verifies that the specified path is owned by the user running the
* current process.
*/
-int is_path_owned_by_current_sid(const char *path);
+int is_path_owned_by_current_sid(const char *path, struct strbuf *report);
#define is_path_owned_by_current_user is_path_owned_by_current_sid
/**