Commit f75a37beb3c26f885d25c774915d627acda1ff4a

Tracey Emery 2021-06-25T20:35:11

fix missed commit found check

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
diff --git a/gotweb/gotweb.c b/gotweb/gotweb.c
index 54bcda5..0f2ac28 100644
--- a/gotweb/gotweb.c
+++ b/gotweb/gotweb.c
@@ -3596,12 +3596,15 @@ done:
 	if (gw_trans->prev_id == NULL && gw_trans->commit_id != NULL &&
 	    (gw_trans->action == GW_BRIEFS || gw_trans->action == GW_COMMITS ||
 	    gw_trans->action == GW_SUMMARY)) {
+		commit_found = 0;
 		TAILQ_FOREACH_REVERSE(t_header, &gw_trans->gw_headers,
 		    headers, entry) {
 			if (commit_found == 0 &&
 			    strcmp(gw_trans->commit_id,
 			    t_header->commit_id) != 0)
 				continue;
+			else
+				commit_found = 1;
 			if (gw_trans->commit_id != NULL &&
 			    strcmp(gw_trans->commit_id,
 			    t_header->commit_id) != 0 &&