コード例 #1
0
ファイル: main.c プロジェクト: apieum/tig
static void
main_register_commit(struct view *view, struct commit *commit, const char *ids, bool is_boundary)
{
	struct main_state *state = view->private;

	string_copy_rev(commit->id, ids);
	if (state->with_graph)
		graph_add_commit(&state->graph, &commit->graph, commit->id, ids, is_boundary);
}
コード例 #2
0
ファイル: main.c プロジェクト: Avinash-Bhat/tig
static void
main_register_commit(struct view *view, struct commit *commit, const char *ids, bool is_boundary)
{
	struct main_state *state = view->private;

	string_copy_rev(commit->id, ids);

	/* FIXME: lazily check index state here instead of in main_open. */
	if ((state->add_changes_unstaged || state->add_changes_staged) && is_head_commit(commit->id)) {
		main_add_changes(view, state, ids);
		state->add_changes_unstaged = state->add_changes_staged = FALSE;
	}

	if (state->with_graph)
		graph_add_commit(state->graph, &commit->graph, commit->id, ids, is_boundary);
}