コード例 #1
0
ファイル: attr.c プロジェクト: Nowher2/git
void git_attr_set_direction(enum git_attr_direction new_direction)
{
	if (is_bare_repository() && new_direction != GIT_ATTR_INDEX)
		BUG("non-INDEX attr direction in a bare repo");

	if (new_direction != direction)
		drop_all_attr_stacks();

	direction = new_direction;
}
コード例 #2
0
ファイル: attr.c プロジェクト: basilgor/git
void git_attr_set_direction(enum git_attr_direction new_direction,
			    struct index_state *istate)
{
	if (is_bare_repository() && new_direction != GIT_ATTR_INDEX)
		die("BUG: non-INDEX attr direction in a bare repo");

	if (new_direction != direction)
		drop_all_attr_stacks();

	direction = new_direction;
	use_index = istate;
}
コード例 #3
0
ファイル: gitdll.c プロジェクト: YueLinHo/TortoiseGit
int git_init(void)
{
	_fmode = _O_BINARY;
	_setmode(_fileno(stdin), _O_BINARY);
	_setmode(_fileno(stdout), _O_BINARY);
	_setmode(_fileno(stderr), _O_BINARY);

	cleanup_chdir_notify();
	reset_git_env();
	// set HOME if not set already
	gitsetenv("HOME", get_windows_home_directory(), 0);
	drop_all_attr_stacks();
	git_config_clear();
	g_prefix = setup_git_directory();
	git_config(git_default_config, NULL);
	invalidate_ref_cache();

	return 0;
}
コード例 #4
0
ファイル: gitdll.c プロジェクト: YueLinHo/TortoiseGit
int git_update_index(void)
{
	char** argv = NULL;
	int argc = 0;
	int ret;

	argv = strtoargv("-q --refresh", &argc);
	if (!argv)
		return -1;

	cleanup_chdir_notify();
	drop_all_attr_stacks();

	ret = cmd_update_index(argc, argv, NULL);
	free(argv);

	discard_cache();
	free_all_pack();

	return ret;
}