commit - d51387a0c213a0d133580b7cf37bca8f7e8569f3
commit + 1fddf795d370eab80e6b2a3e502a6e7e89c9e963
blob - b39c45d7a3b0afb03d2aa58d8de523c49e7e800a
blob + 767893aa64eee3688b73721fe03b7b54ae2f99a8
--- tog/tog.c
+++ tog/tog.c
}
err = got_object_blob_dump_to_file(&blame->filesize, &blame->nlines,
&blame->line_offsets, blame->f, blob);
- if (err || blame->nlines == 0)
+ if (err)
+ goto done;
+ if (blame->nlines == 0) {
+ s->blame_complete = 1;
goto done;
+ }
/* Don't include \n at EOF in the blame line count. */
if (blame->line_offsets[blame->nlines - 1] == blame->filesize)
struct tog_blame_view_state *s = &view->state.blame;
int errcode;
- if (s->blame.thread == NULL) {
+ if (s->blame.thread == NULL && !s->blame_complete) {
errcode = pthread_create(&s->blame.thread, NULL, blame_thread,
&s->blame.thread_args);
if (errcode)