Commit 0d4100bb4ef1929c700f627d1e0c5b099e61fa11

Stefan Sperling 2018-06-23T23:31:35

tog: exit loop if show_commit() returns an error

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/tog/tog.c b/tog/tog.c
index 490cb45..d439851 100644
--- a/tog/tog.c
+++ b/tog/tog.c
@@ -707,7 +707,7 @@ show_log_view(struct got_object_id *start_id, struct got_repository *repo)
 			case '\r':
 				err = show_commit(selected_entry, repo);
 				if (err)
-					break;
+					goto done;
 				show_panel(tog_log_view.panel);
 				break;
 			default: