Commit 34ca489849f1d73f5e1ac4a68208fbb0601901fb

Stefan Sperling 2019-08-13T15:12:28

don't hide repo data parsing errors during 'got log'

diff --git a/got/got.c b/got/got.c
index 4fa6945..2a63d8f 100644
--- a/got/got.c
+++ b/got/got.c
@@ -1403,7 +1403,7 @@ print_commit(struct got_commit_object *commit, struct got_object_id *id,
 		if (strncmp(name, "tags/", 5) == 0) {
 			err = got_object_open_as_tag(&tag, repo, re->id);
 			if (err)
-				break;
+				return err;
 		}
 		cmp = got_object_id_cmp(tag ?
 		    got_object_tag_get_object_id(tag) : re->id, id);
@@ -1416,7 +1416,7 @@ print_commit(struct got_commit_object *commit, struct got_object_id *id,
 		    name) == -1) {
 			err = got_error_from_errno("asprintf");
 			free(s);
-			break;
+			return err;
 		}
 		free(s);
 	}