mrb_value
mrb_Git_CheckoutOptions_initialize(mrb_state* mrb, mrb_value self) {
  git_checkout_options* native_object = (git_checkout_options*)calloc(1, sizeof(git_checkout_options));
  mruby_gift_git_checkout_options_data_ptr(self, native_object);
  git_checkout_init_options(native_object, GIT_CHECKOUT_OPTIONS_VERSION);
  return self;
}
Beispiel #2
0
void test_checkout_icase__initialize(void)
{
	git_oid id;
	git_config *cfg;
	int icase = 0;

	repo = cl_git_sandbox_init("testrepo");

	cl_git_pass(git_repository_config_snapshot(&cfg, repo));
	git_config_get_bool(&icase, cfg, "core.ignorecase");
	git_config_free(cfg);

	if (!icase)
		cl_skip();

	cl_git_pass(git_reference_name_to_id(&id, repo, "refs/heads/dir"));
	cl_git_pass(git_object_lookup(&obj, repo, &id, GIT_OBJ_ANY));

	git_checkout_init_options(&checkout_opts, GIT_CHECKOUT_OPTIONS_VERSION);
	checkout_opts.checkout_strategy = GIT_CHECKOUT_NONE;
}