Пример #1
0
bool
pager_grep(struct view *view, struct line *line)
{
	const char *text[] = { line->data, NULL };

	return grep_text(view, text);
}
Пример #2
0
static bool
branch_grep(struct view *view, struct line *line)
{
	struct branch *branch = line->data;
	const char *text[] = {
		branch->ref->name,
		mkauthor(branch->author, opt_author_width, opt_show_author),
		NULL
	};

	return grep_text(view, text);
}
Пример #3
0
Файл: blame.c Проект: peff/tig
static bool
blame_grep(struct view *view, struct line *line)
{
	struct blame *blame = line->data;
	struct blame_commit *commit = blame->commit;
	const char *text[] = {
		blame->text,
		commit ? commit->title : "",
		commit ? commit->id : "",
		commit ? mkauthor(commit->author, opt_author_width, opt_show_author) : "",
		commit ? mkdate(&commit->time, opt_show_date) : "",
		NULL
	};

	return grep_text(view, text);
}