Commit e6b23735504306b985eac9a322f12aba3f159861

Stefan Sperling 2019-10-04T15:01:59

update reference list when 'tog log' view is refreshed with Ctrl+L

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
diff --git a/tog/tog.c b/tog/tog.c
index 6752a44..972a1f3 100644
--- a/tog/tog.c
+++ b/tog/tog.c
@@ -2142,6 +2142,14 @@ input_log_view(struct tog_view **new_view, struct tog_view **dead_view,
 			view_close(lv);
 			return got_error_from_errno("strdup");
 		}
+		got_ref_list_free(s->refs);
+		err = got_ref_list(s->refs, s->repo, NULL,
+		    got_ref_cmp_by_name, NULL);
+		if (err) {
+			free(start_id);
+			view_close(lv);
+			return got_error_from_errno("strdup");
+		}
 		err = open_log_view(lv, start_id, s->refs, s->repo,
 		    s->head_ref_name, in_repo_path, 0);
 		if (err) {