commit - 758194b584cabffe1f0e63d3c223373757dfb34a
commit + 00338a0472429f16f8de608d0b63e97d751021c8
blob - 931b4f261eb76f1f119d33c65e96779617873b19
blob + 356c450fb45e11593141aab3fd958f62e8aabab9
--- tog/tog.c
+++ tog/tog.c
sig_atomic_t *quit;
struct tog_view *view;
struct commit_queue_entry **first_displayed_entry;
- struct commit_queue_entry **last_displayed_entry;
struct commit_queue_entry **selected_entry;
- int *selected;
};
struct tog_log_view_state {
struct tog_view *view;
struct got_object_id *commit_id;
- FILE *f;
- const char *path;
- int *first_displayed_line;
- int *last_displayed_line;
- int *selected_line;
int *quit;
- int *eof;
};
struct tog_blame_thread_args {
*a->selected_entry = *a->first_displayed_entry;
}
- err = draw_commits(a->view, a->last_displayed_entry,
- a->selected_entry, *a->first_displayed_entry,
- a->commits, *a->selected, a->view->nlines,
- a->in_repo_path, a->commits_needed);
-
if (done)
a->commits_needed = 0;
else if (a->commits_needed == 0) {
s->thread_args.quit = &s->quit;
s->thread_args.view = view;
s->thread_args.first_displayed_entry = &s->first_displayed_entry;
- s->thread_args.last_displayed_entry = &s->last_displayed_entry;
s->thread_args.selected_entry = &s->selected_entry;
- s->thread_args.selected = &s->selected;
errcode = pthread_create(&s->thread, NULL, log_thread,
&s->thread_args);
goto done;
}
line->annotated = 1;
-
- err = draw_blame(a->view, a->commit_id, a->f, a->path,
- a->lines, a->nlines, 0, *a->selected_line, a->first_displayed_line,
- a->last_displayed_line, a->eof, a->view->nlines);
done:
errcode = pthread_mutex_unlock(&tog_mutex);
if (errcode)
got_repo_close(ta->repo);
ta->repo = NULL;
*ta->complete = 1;
- if (!err) {
- err = draw_blame(a->view, a->commit_id, a->f, a->path,
- a->lines, a->nlines, 1, *a->selected_line,
- a->first_displayed_line, a->last_displayed_line, a->eof,
- a->view->nlines);
- }
errcode = pthread_mutex_unlock(&tog_mutex);
if (errcode && err == NULL)
err = got_error_from_errno();
goto done;
}
- blame->cb_args.f = blame->f;
- blame->cb_args.path = path;
- blame->cb_args.first_displayed_line = first_displayed_line;
- blame->cb_args.selected_line = selected_line;
- blame->cb_args.last_displayed_line = last_displayed_line;
blame->cb_args.quit = done;
- blame->cb_args.eof = eof;
blame->thread_args.path = path;
blame->thread_args.repo = thread_repo;