Commit 9aceaadf35fc979f62e0a6761e967d2089f2103c

Stefan Sperling 2020-10-20T21:09:00

properly skip to the end upon error in got_repo_open() ok naddy

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/lib/repository.c b/lib/repository.c
index 5fe931f..50af4bb 100644
--- a/lib/repository.c
+++ b/lib/repository.c
@@ -603,7 +603,7 @@ got_repo_open(struct got_repository **repop, const char *path,
 		if (err == NULL)
 			break;
 		if (err->code != GOT_ERR_NOT_GIT_REPO)
-			break;
+			goto done;
 		if (path[0] == '/' && path[1] == '\0') {
 			if (tried_root) {
 				err = got_error(GOT_ERR_NOT_GIT_REPO);