]> git.ipfire.org Git - thirdparty/git.git/blobdiff - path.c
The sixth batch
[thirdparty/git.git] / path.c
diff --git a/path.c b/path.c
index 67229edb9c2d4c23d97b4418442992ef490cfc55..d838d4be9b6da916ff63c16e343e6bba9de42d08 100644 (file)
--- a/path.c
+++ b/path.c
@@ -829,6 +829,7 @@ const char *enter_repo(const char *path, int strict)
                if (!suffix[i])
                        return NULL;
                gitfile = read_gitfile(used_path.buf);
+               die_upon_dubious_ownership(gitfile, NULL, used_path.buf);
                if (gitfile) {
                        strbuf_reset(&used_path);
                        strbuf_addstr(&used_path, gitfile);
@@ -839,6 +840,7 @@ const char *enter_repo(const char *path, int strict)
        }
        else {
                const char *gitfile = read_gitfile(path);
+               die_upon_dubious_ownership(gitfile, NULL, path);
                if (gitfile)
                        path = gitfile;
                if (chdir(path))