diff options
author | Johannes Schindelin <johannes.schindelin@gmx.de> | 2022-08-08 16:27:47 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2022-08-08 19:25:40 +0300 |
commit | 17d3883fe9c88b823002ad9fafb42313ddc3d3d5 (patch) | |
tree | 25e09eb1ecc069535b76559de03a50406db22fc6 /compat | |
parent | d51e1dff980b9fc87002436b6ab36120a39816b1 (diff) |
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.c | 2 | ||||
-rw-r--r-- | compat/mingw.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/compat/mingw.c b/compat/mingw.c index 2607de93af5..f12b7df16d9 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 a74da68f313..209cf7cebad 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 /** |