示例#1
0
文件: reference.c 项目: jwes/luagi
int luagi_reference_ensure_log( lua_State *L )
{
   git_repository **repo = checkrepo( L, 1 );
   const char *refname = luaL_checkstring( L, 2 );

   if( git_reference_ensure_log( *repo, refname ) )
   {
      ltk_error_abort( L );
   }
   return 0;
}
示例#2
0
文件: reflog.c 项目: csware/libgit2
void test_refs_reflog_reflog__write_when_explicitly_active(void)
{
	git_reference *ref;
	git_oid id;

	git_oid_fromstr(&id, current_master_tip);
	git_reference_ensure_log(g_repo, "refs/tags/foo");

	cl_git_pass(git_reference_create(&ref, g_repo, "refs/tags/foo", &id, 1, NULL));
	git_reference_free(ref);
	assert_has_reflog(true, "refs/tags/foo");
}