commit 0c93d2044bbc9a5f34892bb6b6f44fd5ce96b660 from: Stefan Sperling date: Tue Oct 20 21:09:00 2020 UTC tried_root in got_open_repo is not needed ok naddy commit - aff6eea4a3dab188aabdf9b0c721a5a3cc1dbac7 commit + 0c93d2044bbc9a5f34892bb6b6f44fd5ce96b660 blob - 4ed0eaabe20911ce9b81b13c0b1bc933ac507ab4 blob + 036305e904556fd6910f4e907610f8973a3b2e8a --- lib/repository.c +++ lib/repository.c @@ -552,7 +552,7 @@ got_repo_open(struct got_repository **repop, const cha struct got_repository *repo = NULL; const struct got_error *err = NULL; char *abspath, *repo_path = NULL; - int i, tried_root = 0; + int i; *repop = NULL; @@ -607,11 +607,8 @@ got_repo_open(struct got_repository **repop, const cha if (err->code != GOT_ERR_NOT_GIT_REPO) goto done; if (repo_path[0] == '/' && repo_path[1] == '\0') { - if (tried_root) { - err = got_error(GOT_ERR_NOT_GIT_REPO); - goto done; - } - tried_root = 1; + err = got_error(GOT_ERR_NOT_GIT_REPO); + goto done; } err = got_path_dirname(&parent_path, repo_path); if (err)