diff options
Diffstat (limited to 'src/libgit2/repository.c')
-rw-r--r-- | src/libgit2/repository.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/libgit2/repository.c b/src/libgit2/repository.c index 489d627a0..9f583c4ad 100644 --- a/src/libgit2/repository.c +++ b/src/libgit2/repository.c @@ -34,6 +34,7 @@ #include "worktree.h" #include "path.h" #include "strmap.h" +#include "warning.h" #ifdef GIT_WIN32 # include "win32/w32_util.h" @@ -590,7 +591,8 @@ static int validate_ownership(git_repository *repo) (error = validate_ownership_config(&is_safe, validation_paths[0])) < 0) goto done; - if (!is_safe) { + if (!is_safe && + git_warning(GIT_WARNING_SAFE_DIRECTORY, path) != GIT_WARNING_IGNORE) { git_error_set(GIT_ERROR_CONFIG, "repository path '%s' is not owned by current user", path); |