Commit Diff


commit - 178d3e72333615665cce7ea0ade9bf9fbbf59993
commit + c333d3f7e18758890f7454075451edf36eb26c0f
blob - 67d7b13019ebf7dce5ce7dde943ba5a5d2d7d216
blob + 7d851f4f247951408191157cdfd7b2a4a3eb97e0
--- gotweb/gotweb.c
+++ gotweb/gotweb.c
@@ -3521,7 +3521,7 @@ gw_get_commits(struct gw_trans * gw_trans, struct gw_h
 	error = got_commit_graph_iter_start(graph, id, gw_trans->repo, NULL,
 	    NULL);
 	if (error)
-		goto done;
+		goto err;
 
 	for (;;) {
 		error = got_commit_graph_iter_next(&id, graph, gw_trans->repo,
@@ -3529,14 +3529,14 @@ gw_get_commits(struct gw_trans * gw_trans, struct gw_h
 		if (error) {
 			if (error->code == GOT_ERR_ITER_COMPLETED)
 				error = NULL;
-			goto err;
+			goto done;
 		}
 		if (id == NULL)
 			goto err;
 
 		error = got_object_open_as_commit(&commit, gw_trans->repo, id);
-			if (error)
-				goto err;
+		if (error)
+			goto err;
 		if (limit == 1 && chk_multi == 0 &&
 		    gw_trans->gw_conf->got_max_commits_display != 1) {
 			error = gw_get_commit(gw_trans, header, commit, id);
@@ -3618,7 +3618,6 @@ done:
 			c_cnt++;
 		}
 	}
-
 err:
 	if (commit != NULL)
 		got_object_commit_close(commit);