commit 84453469f5e88c97b95443bca20084df6edb75fd from: Stefan Sperling date: Sun Nov 11 13:36:55 2018 UTC make 'got log' and 'got tree' bail out cleanly upon Ctrl-C commit - 9489f1f77a4a15e1615e514cd49ed27b0be30e21 commit + 84453469f5e88c97b95443bca20084df6edb75fd blob - 6b957753fc295cbe24b91cba4931258c90bdbd2d blob + b4d4bc167688eeb9100d55de06a3e87d2c0e62b7 --- got/got.c +++ got/got.c @@ -412,6 +412,9 @@ print_commits(struct got_object *root_obj, struct got_ struct got_commit_object *commit; struct got_object_id *id; + if (sigint_received || sigpipe_received) + break; + err = got_commit_graph_iter_next(&id, graph); if (err) { if (err->code == GOT_ERR_ITER_COMPLETED) { @@ -837,6 +840,10 @@ print_tree(const char *path, struct got_object_id *com te = SIMPLEQ_FIRST(&entries->head); while (te) { char *id = NULL; + + if (sigint_received || sigpipe_received) + break; + if (show_ids) { char *id_str; err = got_object_id_str(&id_str, te->id);