summaryrefslogtreecommitdiff
path: root/src/libgit2/repository.c
diff options
context:
space:
mode:
authorKevin Saul <kevinsaul@gmail.com>2022-10-01 17:08:49 +1300
committerKevin Saul <kevinsaul@gmail.com>2022-10-01 17:08:49 +1300
commit93c071ac4072bc0cda56bfef371b4890fec40a89 (patch)
tree6357fdfdcdca127866e32fc388049c1851c8871f /src/libgit2/repository.c
parentdd21e20ce20d31c62bf454c681f4a45b671ab35a (diff)
downloadlibgit2-93c071ac4072bc0cda56bfef371b4890fec40a89.tar.gz
repo: ignore missing 'safe.directory' config during ownership checks
Diffstat (limited to 'src/libgit2/repository.c')
-rw-r--r--src/libgit2/repository.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libgit2/repository.c b/src/libgit2/repository.c
index 90ac91db9..dd443a630 100644
--- a/src/libgit2/repository.c
+++ b/src/libgit2/repository.c
@@ -521,6 +521,9 @@ static int validate_ownership_config(bool *is_safe, const char *path)
validate_ownership_cb,
&ownership_data);
+ if (error == GIT_ENOTFOUND)
+ error = 0;
+
git_config_free(config);
git_str_dispose(&ownership_data.tmp);