コード例 #1
0
ファイル: Tag.cpp プロジェクト: andy-campbell/libAcGit
Sha *Tag::tagTarget()
{
    Sha *targetSha = nullptr;
\
    targetSha = new Sha(git_tag_target_id(tag));
    return targetSha;
}
コード例 #2
0
ファイル: tag.c プロジェクト: cboos/pygit2
PyObject *
Tag_target__get__(Tag *self)
{
    const git_oid *oid;

    oid = git_tag_target_id(self->tag);
    return git_oid_to_python(oid->id);
}
コード例 #3
0
ファイル: egit-tag.c プロジェクト: ocodo/.emacs.d
emacs_value egit_tag_target_id(emacs_env *env, emacs_value _tag)
{
    EGIT_ASSERT_TAG(_tag);
    git_tag *tag = EGIT_EXTRACT(_tag);
    const git_oid *oid = git_tag_target_id(tag);
    const char *oid_s = git_oid_tostr_s(oid);
    return EM_STRING(oid_s);
}
コード例 #4
0
ファイル: rugged_tag.c プロジェクト: Angolier/sonic-pi
/*
 *  call-seq:
 *    annotation.target_oid -> oid
 *    annotation.target_id -> oid
 *
 *  Return the oid pointed at by this tag annotation, as a <tt>String</tt>
 *  instance.
 *
 *    annotation.target_id #=> "2cb831a8aea28b2c1b9c63385585b864e4d3bad1"
 */
static VALUE rb_git_tag_annotation_target_id(VALUE self)
{
	git_tag *tag;
	const git_oid *target_oid;

	Data_Get_Struct(self, git_tag, tag);

	target_oid = git_tag_target_id(tag);

	return rugged_create_oid(target_oid);
}
コード例 #5
0
ファイル: cat-file.c プロジェクト: 1336/libgit2
static void show_tag(const git_tag *tag)
{
	char oidstr[GIT_OID_HEXSZ + 1];

	git_oid_tostr(oidstr, sizeof(oidstr), git_tag_target_id(tag));;
	printf("object %s\n", oidstr);
	printf("type %s\n", git_object_type2string(git_tag_target_type(tag)));
	printf("tag %s\n", git_tag_name(tag));
	print_signature("tagger", git_tag_tagger(tag));

	if (git_tag_message(tag))
		printf("\n%s\n", git_tag_message(tag));
}
コード例 #6
0
ファイル: ggit-tag.c プロジェクト: hsoft/libgit2-glib
/**
 * ggit_tag_get_target_id:
 * @tag: a #GgitTag.
 *
 * Gets the target #GgitOId of @tag.
 *
 * Returns: (transfer full): the target #GgitOId of the tag.
 */
GgitOId *
ggit_tag_get_target_id (GgitTag *tag)
{
	const git_oid *oid;
	git_tag *t;

	g_return_val_if_fail (GGIT_IS_TAG (tag), NULL);

	t = _ggit_native_get (tag);
	oid = git_tag_target_id (t);

	return _ggit_oid_wrap ((git_oid *)oid);
}
コード例 #7
0
/**
 * Init slots in S4 class git_tag
 *
 * @param source a tag
 * @param repo S4 class git_repository that contains the tag
 * @param dest S4 class git_tag to initialize
 * @return void
 */
void git2r_tag_init(git_tag *source, SEXP repo, SEXP dest)
{
    const git_signature *tagger;
    const git_oid *oid;
    char sha[GIT_OID_HEXSZ + 1];
    char target[GIT_OID_HEXSZ + 1];

    oid = git_tag_id(source);
    git_oid_tostr(sha, sizeof(sha), oid);
    SET_SLOT(dest, Rf_install("sha"), mkString(sha));

    SET_SLOT(dest, Rf_install("message"), mkString(git_tag_message(source)));
    SET_SLOT(dest, Rf_install("name"), mkString(git_tag_name(source)));

    tagger = git_tag_tagger(source);
    if (tagger)
        git2r_signature_init(tagger, GET_SLOT(dest, Rf_install("tagger")));

    oid = git_tag_target_id(source);
    git_oid_tostr(target, sizeof(target), oid);;
    SET_SLOT(dest, Rf_install("target"), mkString(target));

    SET_SLOT(dest, Rf_install("repo"), repo);
}